Apply patch #1924524 from Casey Raymondson which ensures the 'No constructor defined' message is displayed when attempting to call a constructor on a class that doesn't have a constructor wrapper, eg if the C++ class is abstract.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10323 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-03-26 20:43:45 +00:00
commit 7c6f8dafa7
2 changed files with 7 additions and 1 deletions

View file

@ -1,6 +1,12 @@
Version 1.3.35 (in progress)
============================
03/26/2008: wsfulton
[Python] Apply patch #1924524 from Casey Raymondson which ensures the
"No constructor defined" message is displayed when attempting to call a
constructor on a class that doesn't have a constructor wrapper, eg if
the C++ class is abstract.
03/26/2008: wsfulton
[Python] Apply patch #1925702 from Casey Raymondson which removes warning 512
for std::vector wrappers.

View file

@ -2703,7 +2703,7 @@ public:
Delete(realct);
}
if (!have_constructor) {
Printv(f_shadow_file, tab4, "def __init__(self): raise AttributeError, \"No constructor defined\"\n", NIL);
Printv(f_shadow_file, tab4, "def __init__(self, *args, **kwargs): raise AttributeError, \"No constructor defined\"\n", NIL);
} else if (fastinit) {
Printv(f_wrappers, "SWIGINTERN PyObject *", class_name, "_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {\n", NIL);