aboutsummaryrefslogtreecommitdiff
path: root/src/ld-lua-symbol.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2010-09-30 05:19:31 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2010-10-26 13:58:33 +0200
commite0e63649dc830cd63ae4e7a958e224ef3b2a1375 (patch)
treebfd6ebef764e0e439b2207d1f9d9ddb09985a0bd /src/ld-lua-symbol.c
parent0c9b297e50ffaf9a34f50a99f7bc4e02ea295d1d (diff)
downloadlogdiag-e0e63649dc830cd63ae4e7a958e224ef3b2a1375.tar.gz
logdiag-e0e63649dc830cd63ae4e7a958e224ef3b2a1375.tar.xz
logdiag-e0e63649dc830cd63ae4e7a958e224ef3b2a1375.zip
Redesign the library and related components.
This step is needed, since the current design is quite chaotic and it would not be possible to finish the application. There's still a lot to be done. After this step, it's time to implement the rest of LdLua.
Diffstat (limited to 'src/ld-lua-symbol.c')
-rw-r--r--src/ld-lua-symbol.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/ld-lua-symbol.c b/src/ld-lua-symbol.c
index b3e13af..63a1665 100644
--- a/src/ld-lua-symbol.c
+++ b/src/ld-lua-symbol.c
@@ -12,9 +12,10 @@
#include "config.h"
-#include "ld-library.h"
#include "ld-symbol.h"
#include "ld-symbol-category.h"
+#include "ld-library.h"
+
#include "ld-lua.h"
#include "ld-lua-symbol.h"
@@ -35,6 +36,10 @@
struct _LdLuaSymbolPrivate
{
LdLua *lua;
+ /* XXX: Note that this identifier != symbol name,
+ * since there can be more symbols with the same name,
+ *      only in different categories.
+ */
gchar *ident;
};
@@ -88,15 +93,18 @@ ld_lua_symbol_finalize (GObject *gobject)
* Load a symbol from a file into the library.
*/
LdSymbol *
-ld_lua_symbol_new (LdLua *lua, const gchar *ident)
+ld_lua_symbol_new (const gchar *name, LdLua *lua, const gchar *ident)
{
LdLuaSymbol *self;
+ g_return_val_if_fail (name != NULL, NULL);
g_return_val_if_fail (LD_IS_LUA (lua), NULL);
g_return_val_if_fail (ident != NULL, NULL);
self = g_object_new (LD_TYPE_LUA_SYMBOL, NULL);
+ /* TODO: Set the symbol name. */
+
self->priv->lua = lua;
g_object_ref (lua);