pike.git / src / post_modules / GTK2 / source / support.c

version» Context lines:

pike.git/src/post_modules/GTK2/source/support.c:1288:    GParameter *params;    struct keypair *k;    int e;    int i=0,j;       class=g_type_class_ref(type);    if (class==NULL)    Pike_error("Could not get a reference to type %s.\n",g_type_name(type));    params=g_new0(GParameter,m_sizeof(m));    NEW_MAPPING_LOOP(m->data) { -  if (TYPEOF(k->ind) == PIKE_T_STRING) { -  gchar *s=PGTK_GETSTR(&k->ind); +  if (TYPEOF(keypair_ind(k)) == PIKE_T_STRING) { +  gchar *s=PGTK_GETSTR(&keypair_ind(k));    pspec=g_object_class_find_property(class,s);    if (!pspec) {    PGTK_FREESTR(s);    continue;    }   /* g_value_init(&params[i].value,G_PARAM_SPEC_VALUE_TYPE(pspec)); */ -  pgtk2_set_gvalue(&params[i].value,G_PARAM_SPEC_VALUE_TYPE(pspec),&k->val); +  pgtk2_set_gvalue(&params[i].value,G_PARAM_SPEC_VALUE_TYPE(pspec),&keypair_val(k));    params[i++].name=s;    }    }    obj=g_object_newv(type,i,params);    for (j=0; j<i; j++) {    PGTK_FREESTR((gchar *)params[j].name);    g_value_unset(&params[j].value);    }    g_free(params);    g_type_class_unref(class);