"Core/LuaInterface/Metatables.cs" did not exist on "b4943c8d57cdabf6674f6524be176ef6b3a41da0"
Commit 5cceea06 authored by Vinicius Jarina's avatar Vinicius Jarina
Browse files

Removed warnings.

parent 083518a9
Subproject commit 82933e4c7544174e7a4ded2846bc18f28fad60c5 Subproject commit c4fbc0380573499338679cc014e74f3762fa43e3
Subproject commit 00cbb47c80beeb55069094cd606c923bf33fbaa5 Subproject commit 5a21e63c1948ba4a452c27812c1abe289f0d23fb
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
...@@ -121,8 +122,6 @@ namespace NLua ...@@ -121,8 +122,6 @@ namespace NLua
return extractValues [typeof(LuaFunction).TypeHandle.Value.ToInt64 ()]; return extractValues [typeof(LuaFunction).TypeHandle.Value.ToInt64 ()];
else if (luatype == LuaTypes.Number) else if (luatype == LuaTypes.Number)
return extractValues [typeof(double).TypeHandle.Value.ToInt64 ()]; return extractValues [typeof(double).TypeHandle.Value.ToInt64 ()];
//else
//;//an unsupported type was encountered
} }
if (LuaLib.lua_isnumber (luaState, stackPos)) if (LuaLib.lua_isnumber (luaState, stackPos))
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
...@@ -35,7 +36,7 @@ namespace NLua.Config ...@@ -35,7 +36,7 @@ namespace NLua.Config
#endif #endif
public const string NLuaCompany = "NLua Productions"; public const string NLuaCompany = "NLua Productions";
public const string NLuaProduct = "NLua"; public const string NLuaProduct = "NLua";
public const string NLuaCopyright = "Copyright 2003-2008 Fabio Mascarenhas, Kevin Hesterm and 2012 Megax"; public const string NLuaCopyright = "Copyright 2003-2008 Fabio Mascarenhas, Kevin Hesterm ,Megax and Vinicius Jarina";
public const string NLuaTrademark = "MIT license"; public const string NLuaTrademark = "MIT license";
public const string NLuaVersion = "2.0.4"; public const string NLuaVersion = "2.0.4";
public const string NLuaFileVersion = "2.0.4.0"; public const string NLuaFileVersion = "2.0.4.0";
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
...@@ -373,10 +374,10 @@ namespace NLua ...@@ -373,10 +374,10 @@ namespace NLua
} }
} }
// Generates an implementation of the __luaInterface_getLuaTable method // Generates an implementation of the luaInterfaceGetLuaTable method
var returnTableMethod = myType.DefineMethod ("__luaInterface_getLuaTable", var returnTableMethod = myType.DefineMethod ("LuaInterfaceGetLuaTable",
MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual, typeof(LuaTable), new Type[0]); MethodAttributes.Public | MethodAttributes.HideBySig | MethodAttributes.Virtual, typeof(LuaTable), new Type[0]);
myType.DefineMethodOverride (returnTableMethod, typeof(ILuaGeneratedType).GetMethod ("__luaInterface_getLuaTable")); myType.DefineMethodOverride (returnTableMethod, typeof(ILuaGeneratedType).GetMethod ("LuaInterfaceGetLuaTable"));
generator = returnTableMethod.GetILGenerator (); generator = returnTableMethod.GetILGenerator ();
generator.Emit (OpCodes.Ldfld, luaTableField); generator.Emit (OpCodes.Ldfld, luaTableField);
generator.Emit (OpCodes.Ret); generator.Emit (OpCodes.Ret);
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
...@@ -32,6 +33,6 @@ namespace NLua ...@@ -32,6 +33,6 @@ namespace NLua
*/ */
public interface ILuaGeneratedType public interface ILuaGeneratedType
{ {
LuaTable __luaInterface_getLuaTable (); LuaTable LuaInterfaceGetLuaTable ();
} }
} }
\ No newline at end of file
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
...@@ -155,7 +156,6 @@ namespace NLua ...@@ -155,7 +156,6 @@ namespace NLua
public Lua () public Lua ()
{ {
luaState = LuaLib.luaL_newstate (); // steffenj: Lua 5.1.1 API change (lua_open is gone) luaState = LuaLib.luaL_newstate (); // steffenj: Lua 5.1.1 API change (lua_open is gone)
//LuaLib.luaopen_base(luaState); // steffenj: luaopen_* no longer used
LuaLib.luaL_openlibs (luaState); // steffenj: Lua 5.1.1 API change (luaopen_base is gone, just open all libs right here) LuaLib.luaL_openlibs (luaState); // steffenj: Lua 5.1.1 API change (luaopen_base is gone, just open all libs right here)
LuaLib.lua_pushstring (luaState, "LUAINTERFACE LOADED"); LuaLib.lua_pushstring (luaState, "LUAINTERFACE LOADED");
LuaLib.lua_pushboolean (luaState, true); LuaLib.lua_pushboolean (luaState, true);
...@@ -176,9 +176,6 @@ namespace NLua ...@@ -176,9 +176,6 @@ namespace NLua
// We need to keep this in a managed reference so the delegate doesn't get garbage collected // We need to keep this in a managed reference so the delegate doesn't get garbage collected
panicCallback = new LuaCore.lua_CFunction (PanicCallback); panicCallback = new LuaCore.lua_CFunction (PanicCallback);
LuaLib.lua_atpanic (luaState, panicCallback); LuaLib.lua_atpanic (luaState, panicCallback);
//LuaLib.lua_atlock(luaState, lockCallback = new LuaCore.lua_CFunction(LockCallback));
//LuaLib.lua_atunlock(luaState, unlockCallback = new LuaCore.lua_CFunction(UnlockCallback));
} }
/* /*
...@@ -213,34 +210,11 @@ namespace NLua ...@@ -213,34 +210,11 @@ namespace NLua
_StatePassed = true; _StatePassed = true;
} }
/// <summary>
/// Called for each lua_lock call
/// </summary>
/// <param name = "luaState"></param>
/// Not yet used
/*int LockCallback(LuaCore.lua_State luaState)
{
// Monitor.Enter(luaLock);
return 0;
}*/
/// <summary>
/// Called for each lua_unlock call
/// </summary>
/// <param name = "luaState"></param>
/// Not yet used
/*int UnlockCallback(LuaCore.lua_State luaState)
{
// Monitor.Exit(luaLock);
return 0;
}*/
public void Close () public void Close ()
{ {
if (_StatePassed) if (_StatePassed)
return; return;
////// if(luaState != LuaCore.lua_State.Zero)
if (!luaState.IsNull ()) { if (!luaState.IsNull ()) {
LuaCore.lua_close (luaState); LuaCore.lua_close (luaState);
ObjectTranslatorPool.Instance.Remove (luaState); ObjectTranslatorPool.Instance.Remove (luaState);
...@@ -254,9 +228,7 @@ namespace NLua ...@@ -254,9 +228,7 @@ namespace NLua
[System.Runtime.InteropServices.AllowReversePInvokeCalls] [System.Runtime.InteropServices.AllowReversePInvokeCalls]
static int PanicCallback (LuaCore.lua_State luaState) static int PanicCallback (LuaCore.lua_State luaState)
{ {
// string desc = LuaLib.lua_tostring(luaState, 1);
string reason = string.Format ("unprotected error in call to Lua API ({0})", LuaLib.lua_tostring (luaState, -1)); string reason = string.Format ("unprotected error in call to Lua API ({0})", LuaLib.lua_tostring (luaState, -1));
// lua_tostring(L, -1);
throw new LuaException (reason); throw new LuaException (reason);
} }
...@@ -601,7 +573,7 @@ namespace NLua ...@@ -601,7 +573,7 @@ namespace NLua
} }
/* /*
* Register a delegate type to be used to convert Lua funcitions to C# delegates (useful for iOS where there is no dynamic code generation) * Register a delegate type to be used to convert Lua functions to C# delegates (useful for iOS where there is no dynamic code generation)
* type delegateType * type delegateType
*/ */
public void RegisterLuaDelegateType (Type delegateType, Type luaDelegateType) public void RegisterLuaDelegateType (Type delegateType, Type luaDelegateType)
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
/* /*
* This file is part of NLua. * This file is part of NLua.
* *
* Copyright (c) 2013 Vinicius Jarina (viniciusjarina@gmail.com)
* Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz. * Copyright (C) 2003-2005 Fabio Mascarenhas de Queiroz.
* Copyright (C) 2012 Megax <http://megax.yeahunter.hu/> * Copyright (C) 2012 Megax <http://megax.yeahunter.hu/>
* *
......
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