From: Marcelo M. <mar...@us...> - 2005-08-30 17:36:22
|
Update of /cvsroot/swig/SWIG/Source/Swig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7934 Modified Files: typesys.c Log Message: fix for #1247477, sorting tables properly Index: typesys.c =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/typesys.c,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** typesys.c 30 Aug 2005 17:23:10 -0000 1.31 --- typesys.c 30 Aug 2005 17:36:14 -0000 1.32 *************** *** 1859,1863 **** cast_temp = NewString(""); - Printf(f_forward,"#define SWIGTYPE%s swig_types[%d]\n", ki.item, i); Printv(types,"static swig_type_info _swigt_", ki.item, " = {", NIL); Append(table_list, ki.item); --- 1859,1862 ---- *************** *** 1894,1898 **** if (!Getattr(r_mangled, ei.item) && !Getattr(imported_types, ei.item)) { - Printf(f_forward, "#define SWIGTYPE%s swig_types[%i]\n", ei.item, i); Printf(types, "static swig_type_info _swigt_%s = {\"%s\", 0, 0, 0, 0};\n", ei.item, ei.item); Append(table_list, ei.item); --- 1893,1896 ---- *************** *** 1913,1917 **** --- 1911,1917 ---- /* print the tables in the proper order */ SortList(table_list, SwigType_compare_mangled); + i = 0; for (ki = First(table_list); ki.item; ki = Next(ki)) { + Printf(f_forward,"#define SWIGTYPE%s swig_types[%d]\n", ki.item, i++); Printf(table, " &_swigt_%s,\n", ki.item); Printf(cast_init, " _swigc_%s,\n", ki.item); |