Fixed PyGetSetDescr for python3.2.

Fixed memory management in special_variable_macros test.

Don't define asdict() for multimap.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2011-05-08 06:54:21 +00:00
commit a52612f845
7 changed files with 53 additions and 19 deletions

View file

@ -93,7 +93,8 @@ BUILTIN_BROKEN = \
default_constructor.cpptest \
director_exception.cpptest \
exception_order.cpptest \
threads_exception.cpptest
threads_exception.cpptest \
python_abstractbase.cpptest
BUILTIN_NOT_BROKEN = $(filter-out $(BUILTIN_BROKEN),$(NOT_BROKEN_TEST_CASES))

View file

@ -5,13 +5,25 @@
%warnfilter(SWIGWARN_GO_NAME_CONFLICT); /* Ignoring 'NewName' due to Go name ('NewName') conflict with 'Name' */
%ignore Name::operator=;
%inline %{
struct Name {
Name(const char *n="none") : name(n) {}
Name(const char *n="none") : name(strdup(n ? n : "")) {}
Name(const Name& x) : name(strdup(x.name)) {}
Name& operator= (const Name& x)
{
if (this != &x) {
free(this->name);
this->name = strdup(x.name);
}
return *this;
}
~Name () { free(this->name); }
const char *getName() const { return name; };
Name *getNamePtr() { return this; };
private:
const char *name;
char *name;
};
struct NameWrap {
NameWrap(const char *n="casternone") : name(n) {}