fix director + abstract + constructors, reported by Brian Kelley
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6478 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f7ae968d6b
commit
df9fa977a8
9 changed files with 258 additions and 38 deletions
|
|
@ -82,7 +82,20 @@ Python Options (available with -python)\n\
|
|||
|
||||
class PYTHON : public Language {
|
||||
public:
|
||||
|
||||
PYTHON()
|
||||
{
|
||||
/* Add code to manage protected constructors and directors */
|
||||
director_prot_ctor_code = NewString("");
|
||||
Printv(director_prot_ctor_code,
|
||||
"if ( $comparison ) { /* subclassed */\n",
|
||||
" $director_new \n",
|
||||
"} else {\n",
|
||||
" PyErr_SetString(PyExc_RuntimeError,",
|
||||
" \"accessing abstract class or protected constructor\"); \n",
|
||||
" SWIG_fail;\n",
|
||||
"}\n", NIL);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* main()
|
||||
* ------------------------------------------------------------ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue