From 9271ce11344f672564b50d90aa838ba1bb30c5d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Wed, 27 Oct 2010 20:49:21 +0200 Subject: Separate LdLua and LdSymbolCategory. Originally, ld_lua_load_file_to_category() was adding registered symbols into a passed LdSymbolCategory object. This interface has been rewritten to be more generic by using callbacks to notify about new symbols. --- src/ld-lua.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/ld-lua.h') diff --git a/src/ld-lua.h b/src/ld-lua.h index ea00863..b207d66 100644 --- a/src/ld-lua.h +++ b/src/ld-lua.h @@ -46,12 +46,22 @@ struct _LdLuaClass }; +/** + * LdLuaLoadCallback: + * @symbol: The symbol that has been created. + * @user_data: User data passed to ld_lua_load_file(). + * + * A callback function that is called when a symbol is created. + */ +typedef void (*LdLuaLoadCallback) (LdSymbol *symbol, gpointer user_data); + + GType ld_lua_get_type (void) G_GNUC_CONST; LdLua *ld_lua_new (void); gboolean ld_lua_check_file (LdLua *self, const gchar *filename); -gboolean ld_lua_load_file_to_category (LdLua *self, const gchar *filename, - LdSymbolCategory *category); +gboolean ld_lua_load_file (LdLua *self, const gchar *filename, + LdLuaLoadCallback callback, gpointer user_data); G_END_DECLS -- cgit v1.2.3