Merge branch 'helmutexp' into robhelmut
[uzbl-mobile] / uzbl.c
diff --git a/uzbl.c b/uzbl.c
index 6127680..fc8754f 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -224,7 +224,7 @@ const struct {
 /* construct a hash from the var_name_to_ptr array for quick access */
 void
 make_var_to_name_hash() {
-    struct var_name_to_ptr_t *n2v_p = &var_name_to_ptr;
+    const struct var_name_to_ptr_t *n2v_p = var_name_to_ptr;
     uzbl.comm.proto_var = g_hash_table_new(g_str_hash, g_str_equal);
     while(n2v_p->name) {
         g_hash_table_insert(uzbl.comm.proto_var, n2v_p->name, (gpointer) &n2v_p->cp);
@@ -1908,8 +1908,8 @@ set_var_value(const gchar *name, gchar *val) {
         c->func = NULL;
         c->writeable = 1;
         buf = expand(val, 0);
-        c->ptr = malloc(sizeof(char *));
-        *c->ptr = buf;
+        c->ptr.s = malloc(sizeof(char *));
+        *c->ptr.s = buf;
         g_hash_table_insert(uzbl.comm.proto_var,
                 g_strdup(name), (gpointer) c);
     }