fixed %template within %extend, test added

fixed language symbol table nested classes name separator, test added
fixed %feature "flatnested" working with %extend
fixed Swig_offset_string for empty string
added simple template to save/restore values in current scope (readability reasons)
This commit is contained in:
Vladimir Kalinin 2013-12-19 02:11:22 +04:00
commit b4fef06c42
12 changed files with 55 additions and 39 deletions

View file

@ -559,9 +559,11 @@ Allocate():
virtual int classDeclaration(Node *n) {
Symtab *symtab = Swig_symbol_current();
Swig_symbol_setscope(Getattr(n, "symtab"));
Node *oldInclass = inclass;
AccessMode oldAcessMode = cplus_mode;
save_value<Node*> oldInclass(inclass);
save_value<AccessMode> oldAcessMode(cplus_mode);
save_value<int> oldExtendMode(extendmode);
if (Getattr(n, "template"))
extendmode = 0;
if (!CPlusPlus) {
/* Always have default constructors/destructors in C */
Setattr(n, "allocate:default_constructor", "1");
@ -729,8 +731,6 @@ Allocate():
/* Only care about default behavior. Remove temporary values */
Setattr(n, "allocate:visit", "1");
inclass = oldInclass;
cplus_mode = oldAcessMode;
Swig_symbol_setscope(symtab);
return SWIG_OK;
}