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
6b07ec99
Commit
6b07ec99
authored
Oct 21, 2012
by
Vinicius Jarina
Browse files
Better MonoTouch support.
parent
c4730b0c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Core/KopiLua/KopiLua.IOS.csproj
View file @
6b07ec99
...
...
@@ -29,6 +29,7 @@
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<DefineConstants>
TRACE;LUA_CORE;_WIN32;LUA_COMPAT_VARARG;LUA_COMPAT_MOD;LUA_COMPAT_GFIND;CATCH_EXCEPTIONS
</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
...
...
Core/LuaInterface/CheckType.cs
View file @
6b07ec99
...
...
@@ -153,10 +153,12 @@ namespace LuaInterface
if
(
luatype
==
LuaTypes
.
Function
)
return
extractValues
[
runtimeHandleValue
];
}
#if !MONOTOUCH
else
if
(
typeof
(
Delegate
).
IsAssignableFrom
(
paramType
)
&&
luatype
==
LuaTypes
.
Function
)
return
new
ExtractValue
(
new
DelegateGenerator
(
translator
,
paramType
).
extractGenerated
);
else
if
(
paramType
.
IsInterface
&&
luatype
==
LuaTypes
.
Table
)
return
new
ExtractValue
(
new
ClassGenerator
(
translator
,
paramType
).
extractGenerated
);
#endif
else
if
((
paramType
.
IsInterface
||
paramType
.
IsClass
)
&&
luatype
==
LuaTypes
.
Nil
)
{
// kevinh - allow nil to be silently converted to null - extractNetObject will return null when the item ain't found
...
...
Core/LuaInterface/GenerateEventAssembly/CodeGeneration.cs
View file @
6b07ec99
...
...
@@ -65,16 +65,18 @@ namespace LuaInterface
private
CodeGeneration
()
{
#if MONOTOUCH
throw
new
NotImplementedException
(
" Emit not available on MonoTouch "
);
#else
// Create an assembly name
assemblyName
=
new
AssemblyName
();
assemblyName
.
Name
=
"LuaInterface_generatedcode"
;
// Create a new assembly with one module.
#if !MONOTOUCH
newAssembly
=
Thread
.
GetDomain
().
DefineDynamicAssembly
(
assemblyName
,
AssemblyBuilderAccess
.
Run
);
newModule
=
newAssembly
.
DefineDynamicModule
(
"LuaInterface_generatedcode"
);
#endif
}
/*
...
...
Core/LuaInterface/LuaInterface.IOS.csproj
View file @
6b07ec99
...
...
@@ -29,6 +29,7 @@
<ErrorReport>
prompt
</ErrorReport>
<WarningLevel>
4
</WarningLevel>
<ConsolePause>
False
</ConsolePause>
<DefineConstants>
MONOTOUCH
</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Reference
Include=
"System"
/>
...
...
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