Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
NLua
Commits
fa3a67dc
Commit
fa3a67dc
authored
Oct 25, 2014
by
Vinicius Jarina
Browse files
Removed delagate hack on Metatable.cs
parent
27e4f04c
Changes
1
Show whitespace changes
Inline
Side-by-side
Core/NLua/Metatables.cs
View file @
fa3a67dc
...
...
@@ -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
;
}
}
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
;
}
}
catch
(
ArgumentException
)
{
// If we can't find the getter in our class, recurse up to the base class and see
// if they can help.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment