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

version» Context lines:

pike.git/src/post_modules/GTK2/source/gdkevent.pre:272:      mixed cast(string to)   //! Cast to different types.   {    struct svalue *osp = Pike_sp-args;    char *a;    GdkEvent *e = (GdkEvent *)THIS->obj;       if(!e) Pike_error("No event\n");    -  if( !args || !is_same_string(Pike_sp[-args].u.string,_STR("mapping")) ) -  Pike_error("Can only cast to mapping\n"); +  if( !args || Pike_sp[-args].u.string != literal_mapping_string ) +  {    pop_n_elems( args ); -  +  push_undefined(); +  } +  pop_n_elems( args );       switch(e->type)    {    case GDK_NOTHING:    ref_push_string(_STR("type")); ref_push_string(_STR("nothing"));    break;    case GDK_DELETE:    ref_push_string(_STR("type")); ref_push_string(_STR("delete"));    break;    case GDK_DESTROY: