summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-12 06:59:03 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2013-08-12 06:59:03 +0200
commit68e2e03838a475252e519a7a16a9bcb2e3e4dd62 (patch)
treec3f059fc59c4221fda81f006a578b5b4fe7643bb /includes
parent0d528cd7be88272ac9ce33641ab80a7fd0600f0a (diff)
Adding LuaBigInt and a few more things.
Diffstat (limited to 'includes')
-rw-r--r--includes/BLua.h3
-rw-r--r--includes/LuaBigInt.h20
2 files changed, 22 insertions, 1 deletions
diff --git a/includes/BLua.h b/includes/BLua.h
index 1bcf763..1312051 100644
--- a/includes/BLua.h
+++ b/includes/BLua.h
@@ -123,6 +123,7 @@ class Lua {
void call(const char * funcName, int tableIdx = LUA_GLOBALSINDEX, int nArgs = 0);
void call(int nArgs = 0) { resume(nArgs); }
+ void pcall(int nArgs = 0) throw (GeneralException);
void push() { checkstack(); lua_pushnil(L); }
void push(lua_Number n) { checkstack(); lua_pushnumber(L, n); }
@@ -191,7 +192,7 @@ class Lua {
void weaken();
template<class T>
- T * recast(int n = 1) {
+ T * recast(int n = -1) {
LuaObjectBase * b;
LuaObject<T> * r;
diff --git a/includes/LuaBigInt.h b/includes/LuaBigInt.h
new file mode 100644
index 0000000..260c2e9
--- /dev/null
+++ b/includes/LuaBigInt.h
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <BLua.h>
+#include <BigInt.h>
+
+namespace Balau {
+
+class LuaBigIntFactory : public LuaObjectFactory {
+ public:
+ LuaBigIntFactory(BigInt * b) : m_obj(b) { }
+ static void pushStatics(Lua & L);
+ protected:
+ void pushObjectAndMembers(Lua & L);
+ private:
+ BigInt * m_obj;
+};
+
+void registerLuaBigInt(Lua &);
+
+};