made type field for uzbl_cmdprop an enum
authorHelmut Grohne <helmut@subdivi.de>
Sat, 25 Jul 2009 20:44:38 +0000 (22:44 +0200)
committerHelmut Grohne <helmut@subdivi.de>
Sat, 25 Jul 2009 20:44:38 +0000 (22:44 +0200)
uzbl.c

diff --git a/uzbl.c b/uzbl.c
index b6e670a..dead7d5 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -80,19 +80,19 @@ GOptionEntry entries[] =
     { NULL,      0, 0, 0, NULL, NULL, NULL }
 };
 
+enum ptr_type {TYPE_INT, TYPE_STR, TYPE_FLOAT};
+
 /* associate command names to their properties */
 typedef const struct {
     /* TODO: Make this ambiguous void **ptr into a union { char *char_p; int *int_p; float *float_p; } val;
              the PTR() macro is kind of preventing this change at the moment. */
     void **ptr;
-    int type;
+    enum ptr_type type;
     int dump;
     int writeable;
     void (*func)(void);
 } uzbl_cmdprop;
 
-enum {TYPE_INT, TYPE_STR, TYPE_FLOAT};
-
 /* abbreviations to help keep the table's width humane */
 #define PTR_V(var, t, d, fun) { .ptr = (void*)&(var), .type = TYPE_##t, .dump = d, .writeable = 1, .func = fun }
 #define PTR_C(var, t,    fun) { .ptr = (void*)&(var), .type = TYPE_##t, .dump = 0, .writeable = 0, .func = fun }