summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-12-08 18:24:56 +0100
committermadmaxoft <github@xoft.cz>2013-12-08 18:24:56 +0100
commit4608beb3c6abca76252aa4b39bfd2e5d7fa87609 (patch)
tree009c531ab4774636d5a975b339d55b030d6cbc28
parentFixed VS2008 compilation after those huge changes. (diff)
downloadcuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar.gz
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar.bz2
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar.lz
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar.xz
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.tar.zst
cuberite-4608beb3c6abca76252aa4b39bfd2e5d7fa87609.zip
-rw-r--r--VC2008/MCServer.vcproj4
-rw-r--r--VC2008/ToLua.vcproj10
-rw-r--r--lib/tolua++/include/tolua++.h4
-rw-r--r--lib/tolua++/src/lib/tolua_event.h2
-rw-r--r--lib/tolua++/src/lib/tolua_map.c2
-rw-r--r--src/Bindings/Bindings.cpp2
-rw-r--r--src/Bindings/LuaState.cpp2
-rw-r--r--src/Bindings/ManualBindings.cpp2
-rw-r--r--src/Bindings/PluginLua.cpp2
-rw-r--r--src/Bindings/PluginManager.cpp1
-rw-r--r--src/Bindings/tolua++.h186
-rw-r--r--src/Bindings/tolua_base.h2
12 files changed, 14 insertions, 205 deletions
diff --git a/VC2008/MCServer.vcproj b/VC2008/MCServer.vcproj
index 8bfa31b4b..5b756f3b6 100644
--- a/VC2008/MCServer.vcproj
+++ b/VC2008/MCServer.vcproj
@@ -2010,10 +2010,6 @@
>
</File>
<File
- RelativePath="..\src\Bindings\tolua++.h"
- >
- </File>
- <File
RelativePath="..\src\Bindings\tolua_base.h"
>
</File>
diff --git a/VC2008/ToLua.vcproj b/VC2008/ToLua.vcproj
index 91b7457c7..fc5b95acc 100644
--- a/VC2008/ToLua.vcproj
+++ b/VC2008/ToLua.vcproj
@@ -41,7 +41,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../lib/tolua++/include;../lib/lua/src"
+ AdditionalIncludeDirectories="&quot;../lib/jsoncpp/include&quot;;../lib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -105,7 +105,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../lib/tolua++/include;../lib/lua/src"
+ AdditionalIncludeDirectories="&quot;../lib/jsoncpp/include&quot;;../lib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@@ -168,7 +168,7 @@
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="../lib/tolua++/include;../lib/lua/src"
+ AdditionalIncludeDirectories="&quot;../lib/jsoncpp/include&quot;;../lib"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
@@ -229,7 +229,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../lib/tolua++/include;../lib/lua/src"
+ AdditionalIncludeDirectories="&quot;../lib/jsoncpp/include&quot;;../lib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
@@ -291,7 +291,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
- AdditionalIncludeDirectories="../lib/tolua++/include;../lib/lua/src"
+ AdditionalIncludeDirectories="&quot;../lib/jsoncpp/include&quot;;../lib"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
diff --git a/lib/tolua++/include/tolua++.h b/lib/tolua++/include/tolua++.h
index 3ebd8d246..8da427fe3 100644
--- a/lib/tolua++/include/tolua++.h
+++ b/lib/tolua++/include/tolua++.h
@@ -43,8 +43,8 @@ extern "C" {
typedef int lua_Object;
-#include "../../lua/src/lua.h"
-#include "../../lua/src/lauxlib.h"
+#include "lua/src/lua.h"
+#include "lua/src/lauxlib.h"
struct tolua_Error
{
diff --git a/lib/tolua++/src/lib/tolua_event.h b/lib/tolua++/src/lib/tolua_event.h
index 898f33dfc..d6b071152 100644
--- a/lib/tolua++/src/lib/tolua_event.h
+++ b/lib/tolua++/src/lib/tolua_event.h
@@ -15,7 +15,7 @@
#ifndef TOLUA_EVENT_H
#define TOLUA_EVENT_H
-#include "tolua++.h"
+#include "../../include/tolua++.h"
TOLUA_API void tolua_moduleevents (lua_State* L);
TOLUA_API int tolua_ismodulemetatable (lua_State* L);
diff --git a/lib/tolua++/src/lib/tolua_map.c b/lib/tolua++/src/lib/tolua_map.c
index 7c4a22336..937229610 100644
--- a/lib/tolua++/src/lib/tolua_map.c
+++ b/lib/tolua++/src/lib/tolua_map.c
@@ -25,7 +25,7 @@
/* Create metatable
* Create and register new metatable
*/
-static int tolua_newmetatable (lua_State* L, char* name)
+static int tolua_newmetatable (lua_State* L, const char * name)
{
int r = luaL_newmetatable(L,name);
diff --git a/src/Bindings/Bindings.cpp b/src/Bindings/Bindings.cpp
index 140c307e5..c3607af5d 100644
--- a/src/Bindings/Bindings.cpp
+++ b/src/Bindings/Bindings.cpp
@@ -8,7 +8,7 @@
#endif
#include "string.h"
-#include "tolua++.h"
+#include "tolua++/include/tolua++.h"
/* Exported function */
TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S);
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp
index 6be1ee58c..cfa3f70ca 100644
--- a/src/Bindings/LuaState.cpp
+++ b/src/Bindings/LuaState.cpp
@@ -11,7 +11,7 @@ extern "C"
#include "lua/src/lualib.h"
}
-#include "tolua++.h"
+#include "tolua++/include/tolua++.h"
#include "Bindings.h"
#include "ManualBindings.h"
diff --git a/src/Bindings/ManualBindings.cpp b/src/Bindings/ManualBindings.cpp
index d4444aa01..4f7e1470a 100644
--- a/src/Bindings/ManualBindings.cpp
+++ b/src/Bindings/ManualBindings.cpp
@@ -2,7 +2,7 @@
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "ManualBindings.h"
-#include "tolua++.h"
+#include "tolua++/include/tolua++.h"
#include "Plugin.h"
#include "PluginLua.h"
diff --git a/src/Bindings/PluginLua.cpp b/src/Bindings/PluginLua.cpp
index ebd053a07..d714f2112 100644
--- a/src/Bindings/PluginLua.cpp
+++ b/src/Bindings/PluginLua.cpp
@@ -14,7 +14,7 @@ extern "C"
#include "lua/src/lualib.h"
}
-#include "tolua++.h"
+#include "tolua++/include/tolua++.h"
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp
index 07f16bba2..29ea26577 100644
--- a/src/Bindings/PluginManager.cpp
+++ b/src/Bindings/PluginManager.cpp
@@ -11,7 +11,6 @@
#include "../CommandOutput.h"
#include "inifile/iniFile.h"
-#include "tolua++.h"
#include "../Entities/Player.h"
diff --git a/src/Bindings/tolua++.h b/src/Bindings/tolua++.h
deleted file mode 100644
index 8da427fe3..000000000
--- a/src/Bindings/tolua++.h
+++ /dev/null
@@ -1,186 +0,0 @@
-/* tolua
-** Support code for Lua bindings.
-** Written by Waldemar Celes
-** TeCGraf/PUC-Rio
-** Apr 2003
-** $Id: $
-*/
-
-/* This code is free software; you can redistribute it and/or modify it.
-** The software provided hereunder is on an "as is" basis, and
-** the author has no obligation to provide maintenance, support, updates,
-** enhancements, or modifications.
-*/
-
-
-#ifndef TOLUA_H
-#define TOLUA_H
-
-#ifndef TOLUA_API
-#define TOLUA_API extern
-#endif
-
-#define TOLUA_VERSION "tolua++-1.0.92"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define tolua_pushcppstring(x,y) tolua_pushstring(x,y.c_str())
-#define tolua_iscppstring tolua_isstring
-
-#define tolua_iscppstringarray tolua_isstringarray
-#define tolua_pushfieldcppstring(L,lo,idx,s) tolua_pushfieldstring(L, lo, idx, s.c_str())
-
-#ifndef TEMPLATE_BIND
- #define TEMPLATE_BIND(p)
-#endif
-
-#define TOLUA_TEMPLATE_BIND(p)
-
-#define TOLUA_PROTECTED_DESTRUCTOR
-#define TOLUA_PROPERTY_TYPE(p)
-
-typedef int lua_Object;
-
-#include "lua/src/lua.h"
-#include "lua/src/lauxlib.h"
-
-struct tolua_Error
-{
- int index;
- int array;
- const char* type;
-};
-typedef struct tolua_Error tolua_Error;
-
-#define TOLUA_NOPEER LUA_REGISTRYINDEX /* for lua 5.1 */
-
-TOLUA_API const char* tolua_typename (lua_State* L, int lo);
-TOLUA_API void tolua_error (lua_State* L, const char* msg, tolua_Error* err);
-TOLUA_API int tolua_isnoobj (lua_State* L, int lo, tolua_Error* err);
-TOLUA_API int tolua_isvalue (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isvaluenil (lua_State* L, int lo, tolua_Error* err);
-TOLUA_API int tolua_isboolean (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isnumber (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isstring (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_istable (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertable (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
-TOLUA_API int tolua_isuserdata (lua_State* L, int lo, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertype (lua_State* L, int lo, const char* type, int def, tolua_Error* err);
-TOLUA_API int tolua_isvaluearray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isbooleanarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isnumberarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isstringarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_istablearray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isuserdataarray
- (lua_State* L, int lo, int dim, int def, tolua_Error* err);
-TOLUA_API int tolua_isusertypearray
- (lua_State* L, int lo, const char* type, int dim, int def, tolua_Error* err);
-
-TOLUA_API void tolua_open (lua_State* L);
-
-TOLUA_API void* tolua_copy (lua_State* L, void* value, unsigned int size);
-TOLUA_API int tolua_register_gc (lua_State* L, int lo);
-TOLUA_API int tolua_default_collect (lua_State* tolua_S);
-
-TOLUA_API void tolua_usertype (lua_State* L, const char* type);
-TOLUA_API void tolua_beginmodule (lua_State* L, const char* name);
-TOLUA_API void tolua_endmodule (lua_State* L);
-TOLUA_API void tolua_module (lua_State* L, const char* name, int hasvar);
-TOLUA_API void tolua_class (lua_State* L, const char* name, const char* base);
-TOLUA_API void tolua_cclass (lua_State* L, const char* lname, const char* name, const char* base, lua_CFunction col);
-TOLUA_API void tolua_function (lua_State* L, const char* name, lua_CFunction func);
-TOLUA_API void tolua_constant (lua_State* L, const char* name, lua_Number value);
-TOLUA_API void tolua_variable (lua_State* L, const char* name, lua_CFunction get, lua_CFunction set);
-TOLUA_API void tolua_array (lua_State* L,const char* name, lua_CFunction get, lua_CFunction set);
-
-/* TOLUA_API void tolua_set_call_event(lua_State* L, lua_CFunction func, char* type); */
-/* TOLUA_API void tolua_addbase(lua_State* L, char* name, char* base); */
-
-TOLUA_API void tolua_pushvalue (lua_State* L, int lo);
-TOLUA_API void tolua_pushboolean (lua_State* L, int value);
-TOLUA_API void tolua_pushnumber (lua_State* L, lua_Number value);
-TOLUA_API void tolua_pushstring (lua_State* L, const char* value);
-TOLUA_API void tolua_pushuserdata (lua_State* L, void* value);
-TOLUA_API void tolua_pushusertype (lua_State* L, void* value, const char* type);
-TOLUA_API void tolua_pushusertype_and_takeownership(lua_State* L, void* value, const char* type);
-TOLUA_API void tolua_pushfieldvalue (lua_State* L, int lo, int index, int v);
-TOLUA_API void tolua_pushfieldboolean (lua_State* L, int lo, int index, int v);
-TOLUA_API void tolua_pushfieldnumber (lua_State* L, int lo, int index, lua_Number v);
-TOLUA_API void tolua_pushfieldstring (lua_State* L, int lo, int index, const char* v);
-TOLUA_API void tolua_pushfielduserdata (lua_State* L, int lo, int index, void* v);
-TOLUA_API void tolua_pushfieldusertype (lua_State* L, int lo, int index, void* v, const char* type);
-TOLUA_API void tolua_pushfieldusertype_and_takeownership (lua_State* L, int lo, int index, void* v, const char* type);
-
-TOLUA_API lua_Number tolua_tonumber (lua_State* L, int narg, lua_Number def);
-TOLUA_API const char* tolua_tostring (lua_State* L, int narg, const char* def);
-TOLUA_API void* tolua_touserdata (lua_State* L, int narg, void* def);
-TOLUA_API void* tolua_tousertype (lua_State* L, int narg, void* def);
-TOLUA_API int tolua_tovalue (lua_State* L, int narg, int def);
-TOLUA_API int tolua_toboolean (lua_State* L, int narg, int def);
-TOLUA_API lua_Number tolua_tofieldnumber (lua_State* L, int lo, int index, lua_Number def);
-TOLUA_API const char* tolua_tofieldstring (lua_State* L, int lo, int index, const char* def);
-TOLUA_API void* tolua_tofielduserdata (lua_State* L, int lo, int index, void* def);
-TOLUA_API void* tolua_tofieldusertype (lua_State* L, int lo, int index, void* def);
-TOLUA_API int tolua_tofieldvalue (lua_State* L, int lo, int index, int def);
-TOLUA_API int tolua_getfieldboolean (lua_State* L, int lo, int index, int def);
-
-TOLUA_API void tolua_dobuffer(lua_State* L, char* B, unsigned int size, const char* name);
-
-TOLUA_API int class_gc_event (lua_State* L);
-
-#ifdef __cplusplus
-static inline const char* tolua_tocppstring (lua_State* L, int narg, const char* def) {
-
- const char* s = tolua_tostring(L, narg, def);
- return s?s:"";
-};
-
-static inline const char* tolua_tofieldcppstring (lua_State* L, int lo, int index, const char* def) {
-
- const char* s = tolua_tofieldstring(L, lo, index, def);
- return s?s:"";
-};
-
-#else
-#define tolua_tocppstring tolua_tostring
-#define tolua_tofieldcppstring tolua_tofieldstring
-#endif
-
-TOLUA_API int tolua_fast_isa(lua_State *L, int mt_indexa, int mt_indexb, int super_index);
-
-#ifndef Mtolua_new
-#define Mtolua_new(EXP) new EXP
-#endif
-
-#ifndef Mtolua_delete
-#define Mtolua_delete(EXP) delete EXP
-#endif
-
-#ifndef Mtolua_new_dim
-#define Mtolua_new_dim(EXP, len) new EXP[len]
-#endif
-
-#ifndef Mtolua_delete_dim
-#define Mtolua_delete_dim(EXP) delete [] EXP
-#endif
-
-#ifndef tolua_outside
-#define tolua_outside
-#endif
-
-#ifndef tolua_owned
-#define tolua_owned
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/src/Bindings/tolua_base.h b/src/Bindings/tolua_base.h
index 4f1038c09..6a76f97b1 100644
--- a/src/Bindings/tolua_base.h
+++ b/src/Bindings/tolua_base.h
@@ -3,7 +3,7 @@
#pragma warning(disable:4800) // This file is ONLY included by Bindings.cpp and it throws lots of C4800 warnings
-#include "tolua++.h"
+#include "tolua++/include/tolua++.h"