Hi, Mike. Thank you for your patch. Now it works! 2013/1/25 Mike Pall <mike-1301@xxxxxxxxxx>: > Hiroaki Nakamura wrote: >> Now I am trying to get the callback function defined in another Lua state >> and call pthread_create with the callback address. > > You must cast the Lua function ('hello') to a C function pointer > and then to a number in the other state and then convert it back > to a function pointer in the main state. > > Patch attached. > > --Mike -- 中村 弘輝 )Hiroaki Nakamura) hnakamur@xxxxxxxxx