From 89fdd37dafb0fc3d259d16a92f5579b9a6bc92c5 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sat, 25 Jul 2009 22:44:38 +0200 Subject: [PATCH] made type field for uzbl_cmdprop an enum --- uzbl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uzbl.c b/uzbl.c index b6e670a..dead7d5 100644 --- 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 } -- 1.7.9.5