fix director + abstract + constructors, reported by Brian Kelley

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6478 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-22 07:25:42 +00:00
commit 114c703acd
9 changed files with 258 additions and 38 deletions

View file

@ -68,6 +68,18 @@ static File *f_int_to_enum = 0;
class OCAML : public Language {
public:
OCAML()
{
director_prot_ctor_code = NewString("");
Printv(director_prot_ctor_code,
"if ( $comparison ) { /* subclassed */\n",
" $director_new \n",
"} else {\n",
" failwith(\"accessing abstract class or protected constructor\"); \n",
"}\n", NIL);
}
String *Swig_class_name(Node *n) {
String *name;
name = Copy(Getattr(n, "sym:name"));