From: Márton Németh:

The luaL_reg structure consists of two pointers: char* and a pointer to a function. 
The last entry should also reflect this: it should be { NULL, NULL } instead of { 0, 0 }.

svn path=/trunk/; revision=25175
This commit is contained in:
Jaap Keuter 2008-04-25 18:59:20 +00:00
parent 2bce8b248c
commit a923b5491c
7 changed files with 25 additions and 25 deletions

View File

@ -193,7 +193,7 @@ static const luaL_reg FieldInfo_get[] = {
{"len", FieldInfo__len},
/* WSLUA_ATTRIBUTE FieldInfo_offset RO The offset of this field */
{"offset", FieldInfo__unm},
{0, 0}
{ NULL, NULL }
};
static int FieldInfo__index(lua_State* L) {
@ -272,7 +272,7 @@ static const luaL_reg FieldInfo_meta[] = {
{"__eq", FieldInfo__eq},
{"__le", FieldInfo__le},
{"__lt", FieldInfo__lt},
{0, 0}
{ NULL, NULL }
};
int FieldInfo_register(lua_State* L) {
@ -440,13 +440,13 @@ WSLUA_METAMETHOD Field_tostring(lua_State* L) {
static const luaL_reg Field_methods[] = {
{"new", Field_new},
{0, 0}
{ NULL, NULL }
};
static const luaL_reg Field_meta[] = {
{"__tostring", Field_tostring},
{"__call", Field__call},
{0, 0}
{ NULL, NULL }
};
int Field_register(lua_State* L) {

View File

@ -294,13 +294,13 @@ static int Listener_newindex(lua_State* L) {
static const luaL_reg Listener_methods[] = {
{"new", Listener_new},
{"remove", Listener_remove},
{0, 0}
{ NULL, NULL }
};
static const luaL_reg Listener_meta[] = {
{"__tostring", Listener_tostring},
{"__newindex", Listener_newindex},
{0, 0}
{ NULL, NULL }
};
int Listener_register(lua_State* L) {

View File

@ -539,7 +539,7 @@ static const luaL_reg Columns_meta[] = {
{"__tostring", Columns__tostring },
{"__newindex", Columns__newindex },
{"__index", Columns_index},
{0,0}
{ NULL, NULL }
};
@ -891,7 +891,7 @@ static const luaL_reg Pinfo_meta[] = {
{"__index", Pinfo_index},
{"__newindex",Pinfo_setindex},
{"__tostring", Pinfo_tostring},
{0, 0}
{ NULL, NULL }
};
int Pinfo_register(lua_State* L) {

View File

@ -906,13 +906,13 @@ static const luaL_reg ProtoField_methods[] = {
{"ubytes",ProtoField_ubytes},
{"guid",ProtoField_guid},
{"oid",ProtoField_oid},
{0,0}
{ NULL, NULL }
};
static const luaL_reg ProtoField_meta[] = {
{"__gc", ProtoField_gc },
{"__tostring", ProtoField_tostring },
{0, 0}
{ NULL, NULL }
};
int ProtoField_register(lua_State* L) {
@ -1215,7 +1215,7 @@ static const luaL_reg Proto_meta[] = {
{"__tostring", Proto_tostring},
{"__index", Proto_index},
{"__newindex", Proto_newindex},
{0, 0}
{ NULL, NULL }
};
int Proto_register(lua_State* L) {
@ -1340,12 +1340,12 @@ WSLUA_METAMETHOD Dissector_tostring(lua_State* L) {
static const luaL_reg Dissector_methods[] = {
{"get", Dissector_get },
{"call", Dissector_call },
{0,0}
{ NULL, NULL }
};
static const luaL_reg Dissector_meta[] = {
{"__tostring", Dissector_tostring},
{0, 0}
{ NULL, NULL }
};
int Dissector_register(lua_State* L) {
@ -1632,12 +1632,12 @@ static const luaL_reg DissectorTable_methods[] = {
{"remove", DissectorTable_remove },
{"try", DissectorTable_try },
{"get_dissector", DissectorTable_get_dissector },
{0,0}
{ NULL, NULL }
};
static const luaL_reg DissectorTable_meta[] = {
{"__tostring", DissectorTable_tostring},
{0, 0}
{ NULL, NULL }
};
int DissectorTable_register(lua_State* L) {

View File

@ -297,10 +297,10 @@ static const luaL_reg TreeItem_methods[] = {
{"add_expert_info", TreeItem_add_expert_info},
{"set_generated", TreeItem_set_generated},
{"set_hidden", TreeItem_set_hidden},
{0, 0}
{ NULL, NULL }
};
static const luaL_reg TreeItem_meta[] = {
{0, 0}
{ NULL, NULL }
};

View File

@ -284,7 +284,7 @@ static const luaL_reg ByteArray_methods[] = {
{"tvb", Tvb_new_real},
{"get_index", ByteArray_get_index},
{"set_index", ByteArray_set_index},
{0,0}
{ NULL, NULL }
};
static const luaL_reg ByteArray_meta[] = {
@ -292,7 +292,7 @@ static const luaL_reg ByteArray_meta[] = {
{"__gc", ByteArray_gc},
{"__concat", ByteArray__concat},
{"__call",ByteArray_subset},
{0, 0}
{ NULL, NULL }
};
int ByteArray_register(lua_State* L) {
@ -489,7 +489,7 @@ static const luaL_reg Tvb_methods[] = {
{"range", Tvb_range},
{"len", Tvb_len},
{"offset", Tvb_offset},
{0,0}
{ NULL, NULL }
};
static int Tvb_range(lua_State* L);
@ -497,7 +497,7 @@ static int Tvb_range(lua_State* L);
static const luaL_reg Tvb_meta[] = {
{"__call", Tvb_range},
{"__tostring", Tvb__tostring},
{0, 0}
{ NULL, NULL }
};
int Tvb_register(lua_State* L) {
@ -797,14 +797,14 @@ static const luaL_reg TvbRange_methods[] = {
{"string", TvbRange_string},
{"bytes", TvbRange_bytes},
{"tvb", Tvb_tvb},
{0, 0}
{ NULL, NULL }
};
static const luaL_reg TvbRange_meta[] = {
{"__index", TvbRange_index},
{"__newindex", TvbRange_newindex},
{"__tostring", TvbRange__tostring},
{0, 0}
{ NULL, NULL }
};
int TvbRange_register(lua_State* L) {

View File

@ -368,13 +368,13 @@ WSLUA_METAMETHOD wslua_Dir__gc(lua_State* L) {
static const luaL_reg Dir_methods[] = {
{"open", Dir_open},
{"close", Dir_close},
{0, 0}
{ NULL, NULL }
};
static const luaL_reg Dir_meta[] = {
{"__call", Dir__call},
{"__gc", wslua_Dir__gc},
{0, 0}
{ NULL, NULL }
};
int Dir_register(lua_State* L) {