fixes for templates and template default args, cosmetics, and other fixes for OSS

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6893 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-16 02:12:05 +00:00
commit 0ac8253c3f
20 changed files with 615 additions and 271 deletions

View file

@ -213,6 +213,7 @@ class Allocate : public Dispatcher {
for (int i = 0; i < Len(abstract); i++) {
Node *nn = Getitem(abstract,i);
String *name = Getattr(nn,"name");
if (!name) continue;
String *base_decl = Getattr(nn,"decl");
if (base_decl) base_decl = SwigType_typedef_resolve_all(base_decl);
if (Strstr(name,"~")) continue; /* Don't care about destructors */

View file

@ -91,8 +91,9 @@ int Dispatcher::emit_one(Node *n) {
char *tag = Char(nodeType(n));
if (!tag) {
Printf(stderr,"SWIG: Fatal internal error. Malformed parse tree node!\n");
return SWIG_ERROR;
/* Printf(stderr,"SWIG: Fatal internal error. Malformed parse tree
node!\n"); */
return SWIG_OK;
}
/* Do not proceed if marked with an error */

View file

@ -668,7 +668,7 @@ public:
* ------------------------------------------------------------ */
virtual int classHandler(Node *n) {
static Hash* emitted = NewHash();
String *mangled_classname = 0;
String *real_classname = 0;
@ -698,6 +698,9 @@ public:
real_classname = Getattr(n,"name");
mangled_classname = Swig_name_mangle(real_classname);
if (Getattr(emitted,mangled_classname)) return SWIG_NOWRAP;
Setattr(emitted,mangled_classname,"1");
attr_tab = NewString("");
Printf(attr_tab, "static swig_attribute swig_");
Printv(attr_tab, mangled_classname, "_attributes[] = {\n", NIL);