From: Thadeu Lima de Souza Cascardo Date: Wed, 28 Sep 2005 05:04:23 +0000 (+0000) Subject: Changed symbol value to GQuark X-Git-Tag: cascardo@tlscascardo--private,libgrammatic--lr1--0.1--base-0~11 X-Git-Url: http://git.cascardo.info/?p=cascardo%2Fgrammar.git;a=commitdiff_plain;h=a84befe7a74aef0b745dc72b49788fd9ed6900b0;ds=sidebyside Changed symbol value to GQuark Symbol value is now a GQuark, so it has a string identifier as well as a numeric value. git-archimport-id: cascardo@tlscascardo--private/libgrammatic--dev--0.1--patch-7 --- diff --git a/grammar.c b/grammar.c index 2b56a3a..411cd64 100644 --- a/grammar.c +++ b/grammar.c @@ -5,7 +5,7 @@ struct _rule GList* right; }; -symbol_t* symbol_new (gboolean terminal, gint value) +symbol_t* symbol_new (gboolean terminal, GQuark value) { symbol_t* symbol; symbol = g_malloc (sizeof (symbol_t)); diff --git a/grammar.h b/grammar.h index 0b26b12..526f06b 100644 --- a/grammar.h +++ b/grammar.h @@ -22,7 +22,7 @@ typedef gint (*nextcb) (gpointer, gpointer*); typedef struct { gboolean terminal; - gint value; + GQuark value; } symbol_t; typedef struct _rule rule_t; @@ -38,7 +38,7 @@ typedef struct GType grammar_get_type (); -symbol_t* symbol_new (gboolean, gint); +symbol_t* symbol_new (gboolean, GQuark); symbol_t* symbol_copy (symbol_t*); guint symbol_hash (gconstpointer); gboolean symbol_equal (gconstpointer, gconstpointer);