lm_ssl.c
changeset 38 34a2b880615c
parent 23 13f03e604c8a
child 42 61d0ab29f17f
equal deleted inserted replaced
37:6e425a8e245e 38:34a2b880615c
   119 		ssl = lm_ssl_new ((args > 1) ? buffer : NULL, (LmSSLFunction)callback_lm_ssl,
   119 		ssl = lm_ssl_new ((args > 1) ? buffer : NULL, (LmSSLFunction)callback_lm_ssl,
   120 							cb, (GDestroyNotify)llm_callback_destroy);
   120 							cb, (GDestroyNotify)llm_callback_destroy);
   121 	}
   121 	}
   122 	bless_lm_ssl (L, ssl);
   122 	bless_lm_ssl (L, ssl);
   123 	lm_ssl_unref (ssl); // XXX
   123 	lm_ssl_unref (ssl); // XXX
   124 	D ("SSL %X created", (int) ssl);
   124 	D ("SSL %p created", ssl);
   125 	return 1;
   125 	return 1;
   126 }
   126 }
   127 
   127 
   128 /// lm.ssl.bless
   128 /// lm.ssl.bless
   129 /// Blesses given pointer to lm ssl object.
   129 /// Blesses given pointer to lm ssl object.
   179 }
   179 }
   180 
   180 
   181 static int gc_lm_ssl (lua_State *L)
   181 static int gc_lm_ssl (lua_State *L)
   182 {
   182 {
   183 	llm_ssl_t *object = luaL_checklm_ssl (L, 1);
   183 	llm_ssl_t *object = luaL_checklm_ssl (L, 1);
   184 	D ("SSL %X gc called", (int) object);
   184 	D ("SSL %p gc called", object);
   185 	lm_ssl_unref (object->ssl);
   185 	lm_ssl_unref (object->ssl);
   186 	return 0;
   186 	return 0;
   187 }
   187 }
   188 
   188 
   189 const static luaL_Reg reg_f_lm_ssl[] = {
   189 const static luaL_Reg reg_f_lm_ssl[] = {