Commit 8c0092ef authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Moved to KeraLua.

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