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

@ -0,0 +1,25 @@
%module memberin_extend_c
/* Example from the Manual, section 5.5.6: "Adding member functions to C structures" */
%{
typedef struct {
char name[50];
} Person;
%}
typedef struct {
%extend {
char *name;
}
} Person;
/* Specific implementation of set/get functions */
%{
char *Person_name_get(Person *p) {
return p->name;
}
void Person_name_set(Person *p, char *val) {
strncpy(p->name,val,50);
}
%}