Renamed luaL_reg to luaL_Reg

The original struct name is luaL_Reg, but Lua v5.1 had a
`typedef luaL_reg luaL_Reg`, which in v5.2 was removed
and as a result breaking the build in Awesome which uses luaL_reg
version exclusively.

Signed-off-by: Arvydas Sidorenko <asido4@gmail.com>
This commit is contained in:
Arvydas Sidorenko 2012-06-06 23:07:07 +02:00 committed by Julien Danjou
parent ec5ef67404
commit d61cdb86c9
16 changed files with 37 additions and 37 deletions

View File

@ -124,8 +124,8 @@ luaA_typename(lua_State *L, int idx)
void void
luaA_openlib(lua_State *L, const char *name, luaA_openlib(lua_State *L, const char *name,
const struct luaL_reg methods[], const struct luaL_Reg methods[],
const struct luaL_reg meta[]) const struct luaL_Reg meta[])
{ {
luaL_newmetatable(L, name); /* 1 */ luaL_newmetatable(L, name); /* 1 */
lua_pushvalue(L, -1); /* dup metatable 2 */ lua_pushvalue(L, -1); /* dup metatable 2 */
@ -206,8 +206,8 @@ luaA_class_setup(lua_State *L, lua_class_t *class,
lua_class_checker_t checker, lua_class_checker_t checker,
lua_class_propfunc_t index_miss_property, lua_class_propfunc_t index_miss_property,
lua_class_propfunc_t newindex_miss_property, lua_class_propfunc_t newindex_miss_property,
const struct luaL_reg methods[], const struct luaL_Reg methods[],
const struct luaL_reg meta[]) const struct luaL_Reg meta[])
{ {
/* Create the object metatable */ /* Create the object metatable */
lua_newtable(L); lua_newtable(L);

View File

@ -79,12 +79,12 @@ void luaA_class_connect_signal_from_stack(lua_State *, lua_class_t *, const char
void luaA_class_disconnect_signal_from_stack(lua_State *, lua_class_t *, const char *, int); void luaA_class_disconnect_signal_from_stack(lua_State *, lua_class_t *, const char *, int);
void luaA_class_emit_signal(lua_State *, lua_class_t *, const char *, int); void luaA_class_emit_signal(lua_State *, lua_class_t *, const char *, int);
void luaA_openlib(lua_State *, const char *, const struct luaL_reg[], const struct luaL_reg[]); void luaA_openlib(lua_State *, const char *, const struct luaL_Reg[], const struct luaL_Reg[]);
void luaA_class_setup(lua_State *, lua_class_t *, const char *, lua_class_t *, void luaA_class_setup(lua_State *, lua_class_t *, const char *, lua_class_t *,
lua_class_allocator_t, lua_class_collector_t, lua_class_allocator_t, lua_class_collector_t,
lua_class_checker_t, lua_class_checker_t,
lua_class_propfunc_t, lua_class_propfunc_t, lua_class_propfunc_t, lua_class_propfunc_t,
const struct luaL_reg[], const struct luaL_reg[]); const struct luaL_Reg[], const struct luaL_Reg[]);
void luaA_class_add_property(lua_class_t *, const char *, void luaA_class_add_property(lua_class_t *, const char *,
lua_class_propfunc_t, lua_class_propfunc_t, lua_class_propfunc_t); lua_class_propfunc_t, lua_class_propfunc_t, lua_class_propfunc_t);

2
dbus.c
View File

@ -789,7 +789,7 @@ luaA_dbus_disconnect_signal(lua_State *L)
return 0; return 0;
} }
const struct luaL_reg awesome_dbus_lib[] = const struct luaL_Reg awesome_dbus_lib[] =
{ {
{ "request_name", luaA_dbus_request_name }, { "request_name", luaA_dbus_request_name },
{ "release_name", luaA_dbus_release_name }, { "release_name", luaA_dbus_release_name },

View File

@ -142,7 +142,7 @@ luaA_keygrabber_isrunning(lua_State *L)
return 1; return 1;
} }
const struct luaL_reg awesome_keygrabber_lib[] = const struct luaL_Reg awesome_keygrabber_lib[] =
{ {
{ "run", luaA_keygrabber_run }, { "run", luaA_keygrabber_run },
{ "stop", luaA_keygrabber_stop }, { "stop", luaA_keygrabber_stop },

18
luaa.c
View File

@ -48,15 +48,15 @@
#include "common/backtrace.h" #include "common/backtrace.h"
#ifdef WITH_DBUS #ifdef WITH_DBUS
extern const struct luaL_reg awesome_dbus_lib[]; extern const struct luaL_Reg awesome_dbus_lib[];
#endif #endif
extern const struct luaL_reg awesome_keygrabber_lib[]; extern const struct luaL_Reg awesome_keygrabber_lib[];
extern const struct luaL_reg awesome_mousegrabber_lib[]; extern const struct luaL_Reg awesome_mousegrabber_lib[];
extern const struct luaL_reg awesome_root_lib[]; extern const struct luaL_Reg awesome_root_lib[];
extern const struct luaL_reg awesome_mouse_methods[]; extern const struct luaL_Reg awesome_mouse_methods[];
extern const struct luaL_reg awesome_mouse_meta[]; extern const struct luaL_Reg awesome_mouse_meta[];
extern const struct luaL_reg awesome_screen_methods[]; extern const struct luaL_Reg awesome_screen_methods[];
extern const struct luaL_reg awesome_screen_meta[]; extern const struct luaL_Reg awesome_screen_meta[];
/** Path to config file */ /** Path to config file */
static char *conffile; static char *conffile;
@ -521,7 +521,7 @@ void
luaA_init(xdgHandle* xdg) luaA_init(xdgHandle* xdg)
{ {
lua_State *L; lua_State *L;
static const struct luaL_reg awesome_lib[] = static const struct luaL_Reg awesome_lib[] =
{ {
{ "quit", luaA_quit }, { "quit", luaA_quit },
{ "exec", luaA_exec }, { "exec", luaA_exec },

View File

@ -225,7 +225,7 @@ luaA_mouse_object_under_pointer(lua_State *L)
return 0; return 0;
} }
const struct luaL_reg awesome_mouse_methods[] = const struct luaL_Reg awesome_mouse_methods[] =
{ {
{ "__index", luaA_mouse_index }, { "__index", luaA_mouse_index },
{ "__newindex", luaA_mouse_newindex }, { "__newindex", luaA_mouse_newindex },
@ -233,7 +233,7 @@ const struct luaL_reg awesome_mouse_methods[] =
{ "object_under_pointer", luaA_mouse_object_under_pointer }, { "object_under_pointer", luaA_mouse_object_under_pointer },
{ NULL, NULL } { NULL, NULL }
}; };
const struct luaL_reg awesome_mouse_meta[] = const struct luaL_Reg awesome_mouse_meta[] =
{ {
{ NULL, NULL } { NULL, NULL }
}; };

View File

@ -123,7 +123,7 @@ luaA_mousegrabber_isrunning(lua_State *L)
return 1; return 1;
} }
const struct luaL_reg awesome_mousegrabber_lib[] = const struct luaL_Reg awesome_mousegrabber_lib[] =
{ {
{ "run", luaA_mousegrabber_run }, { "run", luaA_mousegrabber_run },
{ "stop", luaA_mousegrabber_stop }, { "stop", luaA_mousegrabber_stop },

View File

@ -99,14 +99,14 @@ luaA_button_set_button(lua_State *L, button_t *b)
void void
button_class_setup(lua_State *L) button_class_setup(lua_State *L)
{ {
static const struct luaL_reg button_methods[] = static const struct luaL_Reg button_methods[] =
{ {
LUA_CLASS_METHODS(button) LUA_CLASS_METHODS(button)
{ "__call", luaA_button_new }, { "__call", luaA_button_new },
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg button_meta[] = static const struct luaL_Reg button_meta[] =
{ {
LUA_OBJECT_META(button) LUA_OBJECT_META(button)
LUA_CLASS_META LUA_CLASS_META

View File

@ -1648,7 +1648,7 @@ client_checker(client_t *c)
void void
client_class_setup(lua_State *L) client_class_setup(lua_State *L)
{ {
static const struct luaL_reg client_methods[] = static const struct luaL_Reg client_methods[] =
{ {
LUA_CLASS_METHODS(client) LUA_CLASS_METHODS(client)
{ "get", luaA_client_get }, { "get", luaA_client_get },
@ -1657,7 +1657,7 @@ client_class_setup(lua_State *L)
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg client_meta[] = static const struct luaL_Reg client_meta[] =
{ {
LUA_OBJECT_META(client) LUA_OBJECT_META(client)
LUA_CLASS_META LUA_CLASS_META

View File

@ -554,14 +554,14 @@ luaA_drawin_refresh(lua_State *L)
void void
drawin_class_setup(lua_State *L) drawin_class_setup(lua_State *L)
{ {
static const struct luaL_reg drawin_methods[] = static const struct luaL_Reg drawin_methods[] =
{ {
LUA_CLASS_METHODS(drawin) LUA_CLASS_METHODS(drawin)
{ "__call", luaA_drawin_new }, { "__call", luaA_drawin_new },
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg drawin_meta[] = static const struct luaL_Reg drawin_meta[] =
{ {
LUA_OBJECT_META(drawin) LUA_OBJECT_META(drawin)
LUA_CLASS_META LUA_CLASS_META

View File

@ -203,14 +203,14 @@ luaA_key_set_key(lua_State *L, keyb_t *k)
void void
key_class_setup(lua_State *L) key_class_setup(lua_State *L)
{ {
static const struct luaL_reg key_methods[] = static const struct luaL_Reg key_methods[] =
{ {
LUA_CLASS_METHODS(key) LUA_CLASS_METHODS(key)
{ "__call", luaA_key_new }, { "__call", luaA_key_new },
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg key_meta[] = static const struct luaL_Reg key_meta[] =
{ {
LUA_OBJECT_META(key) LUA_OBJECT_META(key)
LUA_CLASS_META LUA_CLASS_META

View File

@ -406,14 +406,14 @@ luaA_tag_get_screen(lua_State *L, tag_t *tag)
void void
tag_class_setup(lua_State *L) tag_class_setup(lua_State *L)
{ {
static const struct luaL_reg tag_methods[] = static const struct luaL_Reg tag_methods[] =
{ {
LUA_CLASS_METHODS(tag) LUA_CLASS_METHODS(tag)
{ "__call", luaA_tag_new }, { "__call", luaA_tag_new },
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg tag_meta[] = static const struct luaL_Reg tag_meta[] =
{ {
LUA_OBJECT_META(tag) LUA_OBJECT_META(tag)
LUA_CLASS_META LUA_CLASS_META

View File

@ -121,14 +121,14 @@ LUA_OBJECT_EXPORT_PROPERTY(timer, atimer_t, started, lua_pushboolean)
void void
timer_class_setup(lua_State *L) timer_class_setup(lua_State *L)
{ {
static const struct luaL_reg timer_methods[] = static const struct luaL_Reg timer_methods[] =
{ {
LUA_CLASS_METHODS(timer) LUA_CLASS_METHODS(timer)
{ "__call", luaA_timer_new }, { "__call", luaA_timer_new },
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg timer_meta[] = static const struct luaL_Reg timer_meta[] =
{ {
LUA_OBJECT_META(timer) LUA_OBJECT_META(timer)
LUA_CLASS_META LUA_CLASS_META

View File

@ -351,12 +351,12 @@ LUA_OBJECT_EXPORT_PROPERTY(window, window_t, border_width, lua_pushnumber)
void void
window_class_setup(lua_State *L) window_class_setup(lua_State *L)
{ {
static const struct luaL_reg window_methods[] = static const struct luaL_Reg window_methods[] =
{ {
{ NULL, NULL } { NULL, NULL }
}; };
static const struct luaL_reg window_meta[] = static const struct luaL_Reg window_meta[] =
{ {
{ "struts", luaA_window_struts }, { "struts", luaA_window_struts },
{ "buttons", luaA_window_buttons }, { "buttons", luaA_window_buttons },

2
root.c
View File

@ -287,7 +287,7 @@ luaA_root_wallpaper(lua_State *L)
return 1; return 1;
} }
const struct luaL_reg awesome_root_lib[] = const struct luaL_Reg awesome_root_lib[] =
{ {
{ "buttons", luaA_root_buttons }, { "buttons", luaA_root_buttons },
{ "keys", luaA_root_keys }, { "keys", luaA_root_keys },

View File

@ -662,14 +662,14 @@ luaA_screen_count(lua_State *L)
return 1; return 1;
} }
const struct luaL_reg awesome_screen_methods[] = const struct luaL_Reg awesome_screen_methods[] =
{ {
{ "count", luaA_screen_count }, { "count", luaA_screen_count },
{ "__index", luaA_screen_module_index }, { "__index", luaA_screen_module_index },
{ NULL, NULL } { NULL, NULL }
}; };
const struct luaL_reg awesome_screen_meta[] = const struct luaL_Reg awesome_screen_meta[] =
{ {
{ "add_signal", luaA_screen_add_signal }, { "add_signal", luaA_screen_add_signal },
{ "connect_signal", luaA_screen_connect_signal }, { "connect_signal", luaA_screen_connect_signal },