lm_proxy.c
changeset 38 34a2b880615c
parent 23 13f03e604c8a
child 54 6bef2082e5f9
equal deleted inserted replaced
37:6e425a8e245e 38:34a2b880615c
    52 		proxy = lm_proxy_new_with_server (type, luaL_checkstring (L, 2), luaL_checkint (L, 3));
    52 		proxy = lm_proxy_new_with_server (type, luaL_checkstring (L, 2), luaL_checkint (L, 3));
    53 	else
    53 	else
    54 		proxy = lm_proxy_new (type);
    54 		proxy = lm_proxy_new (type);
    55 	bless_lm_proxy (L, proxy);
    55 	bless_lm_proxy (L, proxy);
    56 	lm_proxy_unref (proxy); // XXX
    56 	lm_proxy_unref (proxy); // XXX
    57 	D ("Proxy %X created", (int) proxy);
    57 	D ("Proxy %p created", proxy);
    58 	return 1;
    58 	return 1;
    59 }
    59 }
    60 
    60 
    61 /// lm.proxy.bless
    61 /// lm.proxy.bless
    62 /// Blesses given pointer to lm proxy object.
    62 /// Blesses given pointer to lm proxy object.
   155 }
   155 }
   156 
   156 
   157 static int gc_lm_proxy (lua_State *L)
   157 static int gc_lm_proxy (lua_State *L)
   158 {
   158 {
   159 	llm_proxy_t *object = luaL_checklm_proxy (L, 1);
   159 	llm_proxy_t *object = luaL_checklm_proxy (L, 1);
   160 	D ("Proxy %X gc called", (int) object);
   160 	D ("Proxy %p gc called", object);
   161 	lm_proxy_unref (object->proxy);
   161 	lm_proxy_unref (object->proxy);
   162 	return 0;
   162 	return 0;
   163 }
   163 }
   164 
   164 
   165 static const luaL_Reg reg_f_lm_proxy[] = {
   165 static const luaL_Reg reg_f_lm_proxy[] = {