Software /
code /
prosody
Comparison
util-src/encodings.c @ 6412:0e94f89d0e62
util-src/*.c: Use the more concise lua_setfield
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 17 Sep 2014 02:23:17 +0200 |
parent | 6411:6c8f6364bc48 |
child | 6413:a552f4170aed |
comparison
equal
deleted
inserted
replaced
6411:6c8f6364bc48 | 6412:0e94f89d0e62 |
---|---|
366 #ifdef USE_STRINGPREP_ICU | 366 #ifdef USE_STRINGPREP_ICU |
367 init_icu(); | 367 init_icu(); |
368 #endif | 368 #endif |
369 lua_newtable(L); | 369 lua_newtable(L); |
370 | 370 |
371 lua_pushliteral(L, "base64"); | |
372 lua_newtable(L); | 371 lua_newtable(L); |
373 luaL_register(L, NULL, Reg_base64); | 372 luaL_register(L, NULL, Reg_base64); |
374 lua_settable(L,-3); | 373 lua_setfield(L, -2, "base64"); |
375 | 374 |
376 lua_pushliteral(L, "stringprep"); | |
377 lua_newtable(L); | 375 lua_newtable(L); |
378 luaL_register(L, NULL, Reg_stringprep); | 376 luaL_register(L, NULL, Reg_stringprep); |
379 lua_settable(L,-3); | 377 lua_setfield(L, -2, "stringprep"); |
380 | 378 |
381 lua_pushliteral(L, "idna"); | |
382 lua_newtable(L); | 379 lua_newtable(L); |
383 luaL_register(L, NULL, Reg_idna); | 380 luaL_register(L, NULL, Reg_idna); |
384 lua_settable(L,-3); | 381 lua_setfield(L, -2, "idna"); |
385 | 382 |
386 lua_pushliteral(L, "version"); /** version */ | |
387 lua_pushliteral(L, "-3.14"); | 383 lua_pushliteral(L, "-3.14"); |
388 lua_settable(L,-3); | 384 lua_setfield(L, -2, "version"); |
389 return 1; | 385 return 1; |
390 } | 386 } |