lua-users home
lua-l archive

Re: Need help indexing C userdata

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12/02/2020 16:23, Lee Shallis wrote:
> I doubt the problem is anywhere but where I create the data so I'll add
> that below
> 
> int lua_proc_glance_grab( lua_State *L ) {
> proc_glance_t *glance =
> (proc_glance_t*)lua_newuserdata(L,sizeof(proc_glance_t));
> if ( glance ) return 1;
> luaL_setmetatable(L,PROC_GLANCE_CLASS);
> return 1;
> }
Follow the flow of that function, you're not calling luaL_setmetatable.
Scott

AltStyle によって変換されたページ (->オリジナル) /