Revert support for %extend and memberin typemaps added in swig-1.3.39. The memberin typemaps are ignored again for member variables within a %extend block. Documentation inconsistency reported by Torsten Landschoff.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11762 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-12-02 00:01:31 +00:00
commit 2bd190dbf1
9 changed files with 85 additions and 38 deletions

View file

@ -12,8 +12,19 @@ struct ExtendMe {
%{
#include <map>
std::map<ExtendMe*, char *> ExtendMeStringMap;
#define ExtendMe_thing_set(self_, val_) ExtendMeStringMap[self_]
#define ExtendMe_thing_get(self_) ExtendMeStringMap[self_]
void ExtendMe_thing_set(ExtendMe *self, const char *val) {
char *old_val = ExtendMeStringMap[self];
delete [] old_val;
if (val) {
ExtendMeStringMap[self] = new char[strlen(val)+1];
strcpy(ExtendMeStringMap[self], val);
} else {
ExtendMeStringMap[self] = 0;
}
}
char * ExtendMe_thing_get(ExtendMe *self) {
return ExtendMeStringMap[self];
}
%}
%extend ExtendMe {