Change the return value if the compiler to "object" to allow compilers

to return dynamic method objects
remotes/origin/0.6.7-post-fixes
Melanie 2009-08-31 11:42:54 +01:00
parent d2eba2cf22
commit 090868ff4a
4 changed files with 7 additions and 7 deletions

View File

@ -152,7 +152,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine
{
// Compile (We assume LSL)
CompiledScriptFile =
LSLCompiler.PerformScriptCompile(Script,
(string)LSLCompiler.PerformScriptCompile(Script,
assetID.ToString(), taskInventoryItem.OwnerID);
if (presence != null && (!postOnRez))

View File

@ -34,10 +34,10 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
{
public interface ICompiler
{
string PerformScriptCompile(string source, string asset, UUID ownerID);
object PerformScriptCompile(string source, string asset, UUID ownerID);
string[] GetWarnings();
Dictionary<KeyValuePair<int, int>, KeyValuePair<int, int>>
LineMap();
string GetAssemblyName(UUID assetID);
object GetCompilerOutput(UUID assetID);
}
}

View File

@ -259,7 +259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
// }
//}
public string GetAssemblyName(UUID assetID)
public object GetCompilerOutput(UUID assetID)
{
return Path.Combine(ScriptEnginesPath, Path.Combine(
m_scriptEngine.World.RegionInfo.RegionID.ToString(),
@ -271,7 +271,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools
/// </summary>
/// <param name="Script">LSL script</param>
/// <returns>Filename to .dll assembly</returns>
public string PerformScriptCompile(string Script, string asset, UUID ownerUUID)
public object PerformScriptCompile(string Script, string asset, UUID ownerUUID)
{
m_positionMap = null;
m_warnings.Clear();

View File

@ -590,8 +590,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
{
lock (m_AddingAssemblies)
{
assembly = m_Compiler.PerformScriptCompile(script,
assetID.ToString(), item.OwnerID);
assembly = (string)m_Compiler.PerformScriptCompile(script,
assetID.ToString(), item.OwnerID);
if (!m_AddingAssemblies.ContainsKey(assembly)) {
m_AddingAssemblies[assembly] = 1;
} else {