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
"Core/LuaInterface/LuaTable.cs" did not exist on "19e9e63242dda628e450a2ff390be2926155e546"
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
...
@@ -608,15 +608,7 @@ namespace NLua
try
{
try
{
var
value
=
field
.
GetValue
(
obj
);
var
value
=
field
.
GetValue
(
obj
);
if
(!(
value
is
Delegate
))
{
translator
.
Push
(
luaState
,
value
);
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
{
}
catch
{
LuaLib
.
LuaPushNil
(
luaState
);
LuaLib
.
LuaPushNil
(
luaState
);
}
}
...
@@ -631,15 +623,8 @@ namespace NLua
...
@@ -631,15 +623,8 @@ namespace NLua
try
{
try
{
object
value
=
property
.
GetValue
(
obj
,
null
);
object
value
=
property
.
GetValue
(
obj
,
null
);
if
(!(
value
is
Delegate
))
{
translator
.
Push
(
luaState
,
value
);
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
)
{
}
catch
(
ArgumentException
)
{
// If we can't find the getter in our class, recurse up to the base class and see
// If we can't find the getter in our class, recurse up to the base class and see
// if they can help.
// 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