summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile1
-rw-r--r--includes/BLua.h4
-rw-r--r--includes/Handle.h2
3 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 0cc7064..34ea1bd 100644
--- a/Makefile
+++ b/Makefile
@@ -210,5 +210,6 @@ dep: $(ALL_DEPS)
clean:
rm -f $(ALL_OBJECTS) $(TESTS) $(LIB) $(ALL_DEPS)
+ $(MAKE) -C LuaJIT clean
.PHONY: lib tests clean strip LuaJIT
diff --git a/includes/BLua.h b/includes/BLua.h
index addd081..fe84db9 100644
--- a/includes/BLua.h
+++ b/includes/BLua.h
@@ -47,7 +47,7 @@ class Lua {
typedef int (*lua_CallWrapper)(lua_State *, lua_CFunction);
- int ref(int t = -2) { luaL_ref(L, t); }
+ int ref(int t = -2) { return luaL_ref(L, t); }
void unref(int ref, int t = -1) { luaL_unref(L, t, ref); }
void open_base();
@@ -57,7 +57,7 @@ class Lua {
void open_debug();
void open_bit();
void open_jit();
- int wrap_open(openlualib_t open) { int n = gettop(); int r = open(L); while (n < gettop()) remove(n); }
+ int wrap_open(openlualib_t open) { int n = gettop(); int r = open(L); while (n < gettop()) remove(n); return r; }
void openlib(const String & libname, const struct luaL_reg *l, int nup) { luaL_openlib(L, libname.to_charp(), l, nup); }
void setCallWrap(lua_CallWrapper wrapper);
diff --git a/includes/Handle.h b/includes/Handle.h
index 321d8db..5def509 100644
--- a/includes/Handle.h
+++ b/includes/Handle.h
@@ -32,7 +32,7 @@ class Handle {
virtual const char * getName() = 0;
virtual ssize_t read(void * buf, size_t count) throw (GeneralException);
virtual ssize_t write(const void * buf, size_t count) throw (GeneralException);
- void writeString(const char * str, size_t len = -1) { if (len < 0) len = strlen(str); write(str, len); }
+ void writeString(const char * str, ssize_t len = -1) { if (len < 0) len = strlen(str); write(str, len); }
void writeString(const String & str) { write(str.to_charp(), str.strlen()); }
virtual void rseek(off_t offset, int whence = SEEK_SET) throw (GeneralException);
virtual void wseek(off_t offset, int whence = SEEK_SET) throw (GeneralException);