last list rename rule added take precedence

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8394 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2006-01-12 21:10:26 +00:00
commit 012ec517dc

View file

@ -1050,7 +1050,9 @@ void Swig_name_nameobj_add(Hash *name_hash, List *name_list,
Getattr(nameobj,k_matchlist)) {
if (decl) Setattr(nameobj,k_decl, decl);
if (nname && Len(nname)) Setattr(nameobj,k_targetname, nname);
Append(name_list, nameobj);
/* put the new nameobj at the beginnig of the list, such that the
last inserted rule take precedence */
Insert(name_list, 0, nameobj);
} else {
/* here we add an old 'hash' nameobj, simple and fast */
Swig_name_object_set(name_hash,nname,decl,nameobj);