From 085e7a8329ab34cd9d3bc2fa076d656b739959e3 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 5 Oct 2004 23:17:40 +0000 Subject: [PATCH] fix extend_placement.i case, ie extend overloding + member overloading git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6334 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- SWIG/Source/CParse/parser.y | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SWIG/Source/CParse/parser.y b/SWIG/Source/CParse/parser.y index 1a4c20760..b2e42834d 100644 --- a/SWIG/Source/CParse/parser.y +++ b/SWIG/Source/CParse/parser.y @@ -2613,6 +2613,7 @@ cpp_class_decl : } cpp_members RBRACE cpp_opt_declarators { Node *p; SwigType *ty; + Node *am = 0; inclass = 0; $$ = new_node("class"); Setline($$,cparse_start_line); @@ -2624,12 +2625,12 @@ cpp_class_decl : Setattr($$,"abstract", pure_abstract($7)); /* This bit of code merges in a previously defined %extend directive (if any) */ + if (extendhash) { String *clsname = Swig_symbol_qualifiedscopename(0); - Node *am = Getattr(extendhash,clsname); + am = Getattr(extendhash,clsname); if (am) { merge_extensions($$,am); - appendChild($$,am); Delattr(extendhash,clsname); } Delete(clsname); @@ -2638,6 +2639,8 @@ cpp_class_decl : Setattr(classes,Swig_symbol_qualifiedscopename(0),$$); appendChild($$,$7); + if (am) appendChild($$,am); + p = $9; if (p) { set_nextSibling($$,p);