pike.git / src / post_modules / GTK2 / source / gladexml.pre

version» Context lines:

pike.git/src/post_modules/GTK2/source/gladexml.pre:37:   /*    funname=make_shared_string(handler_name);    cb=low_mapping_string_lookup(callbacks,funname);    free_string(funname);   */    cb=simple_mapping_string_lookup(callbacks,handler_name);    if (cb==NULL) {    fprintf(stderr,"** WARNING **: Unknown function %s for signal %s\n",    handler_name,signal_name);    return; -  } else if (cb->type!=PIKE_T_FUNCTION) { +  } else if (TYPEOF(*cb) != PIKE_T_FUNCTION) {    fprintf(stderr,"** WARNING **: Value for handler %s for signal %s not a function.\n",    handler_name,signal_name);    return;    }    b=(struct signal_data *)g_malloc(sizeof(struct signal_data));    if (b==NULL)    Pike_error(msg_out_of_mem);    assign_svalue_no_free(&b->cb,cb);    assign_svalue_no_free(&b->args,data);    b->signal_id=g_signal_lookup(signal_name,G_TYPE_FROM_INSTANCE(object));
pike.git/src/post_modules/GTK2/source/gladexml.pre:195:    push_int(-1);    }   }      void signal_autoconnect(mapping(string:function) callbacks, mixed data)   //! Try to connect functions to all signals in the interface. The mapping   //! should consist of handler name : function pairs. The data argument will   //! be saved and sent as the first argument to all callback functions.   {    pgtk2_verify_inited(); -  if (args!=2 || Pike_sp[-args].type!=PIKE_T_MAPPING) +  if (args!=2 || TYPEOF(Pike_sp[-args]) != PIKE_T_MAPPING)    Pike_error("GTK2.GladeXML->signal_autoconnect: Invalid arguments, expected (mapping,mixed)\n");    glade_xml_signal_autoconnect_full(GLADE_XML(THIS->obj),pgtk2__signal_connect,&args);    RETURN_THIS();   }      endrequire;