add support for template_extmode, ie, the emitonlychildren feature

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6804 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-01 00:50:06 +00:00
commit b644501be6
3 changed files with 30 additions and 22 deletions

View file

@ -1071,10 +1071,13 @@ public:
* ------------------------------------------------------------ */ * ------------------------------------------------------------ */
virtual int classDeclaration(Node *n) { virtual int classDeclaration(Node *n) {
/* Do some work on the class name */ /* Do some work on the class name */
if (!Getattr(n,"feature:onlychildren")) {
if (blessed) { if (blessed) {
setclassname(n); setclassname(n);
Append(classlist,n); Append(classlist,n);
} }
}
return Language::classDeclaration(n); return Language::classDeclaration(n);
} }

View file

@ -1405,8 +1405,11 @@ public:
* ------------------------------------------------------------ */ * ------------------------------------------------------------ */
virtual int classDeclaration(Node *n) { virtual int classDeclaration(Node *n) {
if (!Getattr(n,"feature:onlychildren")) {
String *symname = Getattr(n,"sym:name"); String *symname = Getattr(n,"sym:name");
Setattr(n,"php:proxy",symname); Setattr(n,"php:proxy",symname);
}
return Language::classDeclaration(n); return Language::classDeclaration(n);
} }

View file

@ -1439,7 +1439,7 @@ public:
} }
Swig_warning(WARN_RUBY_WRONG_NAME, input_file, line_number, Swig_warning(WARN_RUBY_WRONG_NAME, input_file, line_number,
"Wrong %s name\n", reason); "Wrong %s name %s\n", reason, name);
return name; return name;
} }
@ -1505,6 +1505,7 @@ public:
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
virtual int classDeclaration(Node *n) { virtual int classDeclaration(Node *n) {
if (!Getattr(n,"feature:onlychildren")) {
String *name = Getattr(n,"name"); String *name = Getattr(n,"name");
String *symname = Getattr(n,"sym:name"); String *symname = Getattr(n,"sym:name");
String *tdname = Getattr(n,"tdname"); String *tdname = Getattr(n,"tdname");
@ -1521,6 +1522,7 @@ public:
Delete(valid_name); Delete(valid_name);
} }
Delete(namestr); Delete(namestr);
}
return Language::classDeclaration(n); return Language::classDeclaration(n);
} }