Trouble splitting class registration

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Trouble splitting class registration

"Голубев С.В."
Hi, Arvid. I have some trouble when using splitted class registration,
as described in the documentation. luabind crashes with "segmentation
fault" or "invalid opcode" exceptions when i bind one of my classes to
lua. If i am binding this class without binding any method or
properties, it will work ok, but when i bind any method or property of
this class, my code crashes.

Binding code of all classes looks like this:

static luabind::scope classname::bind(void) {
    using namespace luabind;
    return class_<classname>("classname")
          /*
             methods and properties declaration
        */
}


Binder procedure:

void bind_all(lua_State *pState) {
    module(pState) [
       class_1::bind(),
       class_2::bind(),
       class_3::bind(),
       /*
          etc...
        */
       last_class::bind(),
    ];
}


If i place all binding code into single compilation unit, it works ok,
but compiling requires mooooooore time ))
Program crashes in call of last_class::bind(). If i comment this line,
it will work


I am using luabind 7 beta.

Thanks for your help.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
luabind-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/luabind-user