Fixed a bug in RUBY::classDirectorConstructor().

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5123 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Logan Johnson 2003-09-19 20:31:30 +00:00
commit ba19965de9

View file

@ -607,8 +607,8 @@ public:
} }
/* Set comparison with none for ConstructorToFunction */ /* Set comparison with none for ConstructorToFunction */
// setSubclassInstanceCheck(NewString("CLASS_OF(self) != Qnil")); setSubclassInstanceCheck(NewString("CLASS_OF(self) != Qnil")); // FIXME
setSubclassInstanceCheck(NewString("CLASS_OF(self) != cFoo.klass")); // setSubclassInstanceCheck(NewString("CLASS_OF(self) != cFoo.klass"));
/* Initialize all of the output files */ /* Initialize all of the output files */
String *outfile = Getattr(n,"outfile"); String *outfile = Getattr(n,"outfile");
@ -2082,8 +2082,7 @@ public:
Parm *p, *ip; Parm *p, *ip;
ParmList *superparms = Getattr(n, "parms"); ParmList *superparms = Getattr(n, "parms");
ParmList *parms = CopyParmList(superparms); ParmList *parms = CopyParmList(superparms);
String *type = NewString("PyObject"); String *type = NewString("VALUE");
SwigType_add_pointer(type);
p = NewParm(type, NewString("self")); p = NewParm(type, NewString("self"));
set_nextSibling(p, parms); set_nextSibling(p, parms);
parms = p; parms = p;
@ -2139,7 +2138,7 @@ public:
* classDirectorMethod() * classDirectorMethod()
* *
* Emit a virtual director method to pass a method call on to the * Emit a virtual director method to pass a method call on to the
* underlying Python object. * underlying Ruby instance.
* *
* --------------------------------------------------------------- */ * --------------------------------------------------------------- */
@ -2433,7 +2432,7 @@ public:
/* check that have a wrapped Ruby object */ /* check that have a wrapped Ruby object */
Printv(w->code, "assert(__get_self() != Qnil);\n", NIL); Printv(w->code, "assert(__get_self() != Qnil);\n", NIL);
/* wrap complex arguments to PyObjects */ /* wrap complex arguments to VALUEs */
Printv(w->code, wrap_args, NIL); Printv(w->code, wrap_args, NIL);
/* pass the method call on to the Ruby object */ /* pass the method call on to the Ruby object */