summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2003-12-26 21:15:44 +0000
committerpixel <pixel>2003-12-26 21:15:44 +0000
commit9b09113b20f4298e8fbb4d7e8d360dca61a8ec51 (patch)
treed410f14442abb26f6d12dc8721a89caca54aaa3c
parent9c69b3e095aa568b1779dfef4480f97ea983ac49 (diff)
Lua & typeinfo
-rw-r--r--lib/BLua.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/BLua.cc b/lib/BLua.cc
index 70181be..7624b57 100644
--- a/lib/BLua.cc
+++ b/lib/BLua.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: BLua.cc,v 1.14 2003-12-14 22:04:33 pixel Exp $ */
+/* $Id: BLua.cc,v 1.15 2003-12-26 21:15:44 pixel Exp $ */
#include <lualib.h>
@@ -574,10 +574,15 @@ int LuaStatics::collector(lua_State * _L) {
Lua * L = Lua::find(_L);
void ** u = (void **) L->touserdata();
bool * obj = (bool *) (u + 1);
+ printm(M_INFO, "From LUA: collecting object\n");
if (*obj) {
+ printm(M_INFO, "Is object at %p\n", *u);
Base * b = (Base *) *u;
+ const type_info & t = typeid(b);
+ printm(M_INFO, "Type: " + String(t.name()) + "\n");
delete b;
} else {
+ printm(M_INFO, "Is struct at %p\n", *u);
free(*u);
}
*u = 0;