From: Marcelo M. <mar...@us...> - 2005-03-07 20:34:59
|
Update of /cvsroot/swig/SWIG/Source/Swig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6344 Modified Files: symbol.c Log Message: fix several memory leaks and add static keys like 'k_name' Index: symbol.c =================================================================== RCS file: /cvsroot/swig/SWIG/Source/Swig/symbol.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** symbol.c 20 Dec 2004 21:16:13 -0000 1.22 --- symbol.c 7 Mar 2005 20:34:44 -0000 1.23 *************** *** 175,178 **** --- 175,205 ---- static Hash *global_scope = 0; /* Global scope */ + /* common attribute keys, to avoid calling find_key all the times */ + static String *k_name = 0; + static String *k_coloncolon = 0; + static String *k_decl = 0; + static String *k_cdecl = 0; + static String *k_uname = 0; + static String *k_type = 0; [...1317 lines suppressed...] ! Append(qn,Getattr(n,k_name)); Delete(value); value = qn; *************** *** 1687,1693 **** break; } ! } else if ((Strcmp(nodeType(n),"cdecl") == 0) && (Getattr(n,"value"))) { Delete(value); ! value = Copy(Getattr(n,"value")); continue; } --- 1755,1761 ---- break; } ! } else if ((Strcmp(nodeType(n),k_cdecl) == 0) && (Getattr(n,k_value))) { Delete(value); ! value = Copy(Getattr(n,k_value)); continue; } |