Update of /cvsroot/pure-data/pd/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24530
Modified Files: Tag: desiredata kernel.c Log Message: fix the length field of builtin symbols
Index: kernel.c =================================================================== RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v retrieving revision 1.1.2.77 retrieving revision 1.1.2.78 diff -C2 -d -r1.1.2.77 -r1.1.2.78 *** kernel.c 2 Aug 2007 21:12:54 -0000 1.1.2.77 --- kernel.c 3 Aug 2007 00:18:54 -0000 1.1.2.78 *************** *** 1255,1271 **** }
! /* !@#$ this has to be changed to fit with gensym2 changes */ ! t_symbol s_pointer = {"pointer", 0, 0}; ! t_symbol s_float = {"float", 0, 0}; ! t_symbol s_symbol = {"symbol", 0, 0}; ! t_symbol s_bang = {"bang", 0, 0}; ! t_symbol s_list = {"list", 0, 0}; ! t_symbol s_anything = {"anything", 0, 0}; ! t_symbol s_signal = {"signal", 0, 0}; ! t_symbol s__N = {"#N", 0, 0}; ! t_symbol s__X = {"#X", 0, 0}; ! t_symbol s_x = {"x", 0, 0}; ! t_symbol s_y = {"y", 0, 0}; ! t_symbol s_ = {"", 0, 0};
static t_symbol *symlist[] = { &s_pointer, &s_float, &s_symbol, &s_bang, --- 1255,1271 ---- }
! #define MAKESYM(CSYM,S) t_symbol CSYM = {S,0,0,1,0xdeadbeef}; ! MAKESYM(s_pointer ,"pointer") ! MAKESYM(s_float ,"float") ! MAKESYM(s_symbol ,"symbol") ! MAKESYM(s_bang ,"bang") ! MAKESYM(s_list ,"list") ! MAKESYM(s_anything,"anything") ! MAKESYM(s_signal ,"signal") ! MAKESYM(s__N ,"#N") ! MAKESYM(s__X ,"#X") ! MAKESYM(s_x ,"x") ! MAKESYM(s_y ,"y") ! MAKESYM(s_ ,"")
static t_symbol *symlist[] = { &s_pointer, &s_float, &s_symbol, &s_bang, *************** *** 2362,2370 **** (t_method)wire_free, sizeof(t_wire), CLASS_GOBJ, A_GIMME, 0); class_setsavefn(wire_class,(t_savefn)wire_save); - t_symbol **sp; - int i; if (pd_objectmaker._class) bug("ARGH"); ! for (i=sizeof(symlist)/sizeof(*symlist), sp = symlist; i--; sp++) ! (void) dogensym((*sp)->name, strlen((*sp)->name), *sp); pd_objectmaker._class = class_new(gensym("objectmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); pd_canvasmaker._class = class_new(gensym("canvasmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); --- 2362,2370 ---- (t_method)wire_free, sizeof(t_wire), CLASS_GOBJ, A_GIMME, 0); class_setsavefn(wire_class,(t_savefn)wire_save); if (pd_objectmaker._class) bug("ARGH"); ! for (int i=0; i<sizeof(symlist)/sizeof(*symlist); i++) { ! symlist[i]->n = strlen(symlist[i]->name); ! dogensym(symlist[i]->name, symlist[i]->n, symlist[i]); /* why does this take three args? */ ! } pd_objectmaker._class = class_new(gensym("objectmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL); pd_canvasmaker._class = class_new(gensym("canvasmaker"), 0, 0, sizeof(t_pd), CLASS_DEFAULT, A_NULL);