Commit fa3a67dc authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Removed delagate hack on Metatable.cs

parent 27e4f04c
......@@ -608,15 +608,7 @@ namespace NLua
try {
var value = field.GetValue (obj);
if (!(value is Delegate)) {
translator.Push (luaState, value);
} else {
Delegate del = (Delegate)value;
var wrapper = new LuaNativeFunction ((new LuaMethodWrapper (translator, del.Target, objType, del.Method)).invokeFunction);
translator.PushFunction (luaState, wrapper);
translator.Push (luaState, true);
return 2;
}
translator.Push (luaState, value);
} catch {
LuaLib.LuaPushNil (luaState);
}
......@@ -631,15 +623,8 @@ namespace NLua
try {
object value = property.GetValue (obj, null);
if (!(value is Delegate)) {
translator.Push (luaState, value);
} else {
Delegate del = (Delegate)value;
var wrapper = new LuaNativeFunction ((new LuaMethodWrapper (translator, del.Target, objType, del.Method)).invokeFunction);
translator.PushFunction (luaState, wrapper);
translator.Push (luaState, true);
return 2;
}
translator.Push (luaState, value);
} catch (ArgumentException) {
// If we can't find the getter in our class, recurse up to the base class and see
// if they can help.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment