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
8c0092ef
Commit
8c0092ef
authored
Feb 27, 2013
by
Vinicius Jarina
Browse files
Moved to KeraLua.
parent
8727f69d
Changes
23
Hide whitespace changes
Inline
Side-by-side
Core/LuaInterface/ObjectTranslator.cs
View file @
8c0092ef
...
...
@@ -34,7 +34,7 @@ using LuaInterface.Extensions;
namespace
LuaInterface
{
using
LuaCore
=
K
opi
Lua
.
Lua
;
using
LuaCore
=
K
era
Lua
.
Lua
;
/*
* Passes objects from the CLR to Lua and vice-versa
...
...
@@ -232,6 +232,10 @@ namespace LuaInterface
* Implementation of load_assembly. Throws an error
* if the assembly is not found.
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
loadAssembly
(
LuaCore
.
lua_State
luaState
)
{
try
{
...
...
@@ -271,6 +275,10 @@ namespace LuaInterface
* Implementation of import_type. Returns nil if the
* type is not found.
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
importType
(
LuaCore
.
lua_State
luaState
)
{
string
className
=
LuaLib
.
lua_tostring
(
luaState
,
1
).
ToString
();
...
...
@@ -289,6 +297,10 @@ namespace LuaInterface
* argument in the stack) as an object subclassing the
* type passed as second argument in the stack.
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
registerTable
(
LuaCore
.
lua_State
luaState
)
{
if
(
LuaLib
.
lua_type
(
luaState
,
1
)
==
LuaTypes
.
Table
)
{
...
...
@@ -331,6 +343,10 @@ namespace LuaInterface
* Implementation of free_object. Clears the metatable and the
* base field, freeing the created object for garbage-collection
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
unregisterTable
(
LuaCore
.
lua_State
luaState
)
{
try
{
...
...
@@ -366,6 +382,10 @@ namespace LuaInterface
* Implementation of get_method_bysig. Returns nil
* if no matching method is not found.
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getMethodSignature
(
LuaCore
.
lua_State
luaState
)
{
IReflect
klass
;
...
...
@@ -410,6 +430,10 @@ namespace LuaInterface
* Implementation of get_constructor_bysig. Returns nil
* if no matching constructor is found.
*/
#if MONOTOUCH
[
MonoTouch
.
MonoPInvokeCallback
(
typeof
(
Lua
.
lua_CFunction
))]
#endif
[
System
.
Runtime
.
InteropServices
.
AllowReversePInvokeCalls
]
private
int
getConstructorSignature
(
LuaCore
.
lua_State
luaState
)
{
IReflect
klass
=
null
;
...
...
LuaInterface.sln
View file @
8c0092ef
...
...
@@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LuaInterfaceTest", "LuaInte
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "KeraLua", "Core\KeraLua\KeraLua.csproj", "{47153754-10F5-44D8-B578-F5A32B69061A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleTest", "ConsoleTest\ConsoleTest.csproj", "{A42D438C-34B3-4D3D-8165-8D3779FE16A7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
...
...
@@ -43,11 +45,17 @@ Global
{47153754-10F5-44D8-B578-F5A32B69061A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{47153754-10F5-44D8-B578-F5A32B69061A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{47153754-10F5-44D8-B578-F5A32B69061A}.Release|Any CPU.Build.0 = Release|Any CPU
{A42D438C-34B3-4D3D-8165-8D3779FE16A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A42D438C-34B3-4D3D-8165-8D3779FE16A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A42D438C-34B3-4D3D-8165-8D3779FE16A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A42D438C-34B3-4D3D-8165-8D3779FE16A7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D5FCADFA-5047-40C2-B392-256875862920} = {0E28CF40-4DFA-46FE-95BB-E90648DFE6F5}
{A42D438C-34B3-4D3D-8165-8D3779FE16A7} = {0E28CF40-4DFA-46FE-95BB-E90648DFE6F5}
{3CE4CCB6-3465-43E3-B5ED-5FB9B70D20E5} = {B13128D8-A4F3-4C53-A4C6-F2EA34F527BD}
{E8DDBC21-EF74-4ABA-9C49-BFC702BE25D8} = {B8664957-CB71-4F11-A4DB-59E7514BC5F3}
{F55CABBB-4108-4A39-94E1-581FD46DC021} = {B8664957-CB71-4F11-A4DB-59E7514BC5F3}
...
...
LuaInterfaceTest/LuaInterfaceTest.csproj
View file @
8c0092ef
...
...
@@ -12,6 +12,8 @@
<AssemblyName>
LuaInterfaceTest
</AssemblyName>
<FileAlignment>
512
</FileAlignment>
<ReleaseVersion>
2.x
</ReleaseVersion>
<TargetFrameworkVersion>
v3.5
</TargetFrameworkVersion>
<TargetFrameworkProfile
/>
</PropertyGroup>
<PropertyGroup
Condition=
" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "
>
<DebugSymbols>
True
</DebugSymbols>
...
...
Prev
1
2
Next
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