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:
parent
c600268775
commit
114c703acd
9 changed files with 258 additions and 38 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue