fixes for new flag attribute convention

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-10-07 13:19:06 +00:00
commit fe00d5cb85
7 changed files with 53 additions and 45 deletions

View file

@ -62,7 +62,7 @@
%typemap(doc) int a "a: special comment for parameter a";
%typemap(doc) int b "b: another special comment for parameter b";
%pythoncallback(1) func_cb;
%callback(1) func_cb;
%inline {

View file

@ -1,11 +1,11 @@
%module nondynamic
/*
Use the "static" feature to make the wrapped class a static one,
ie, a python class that doesn't dynamically add new attributes.
Hence, for the class
Use the %pythonnondynamic directuve to make the wrapped class a
nondynamic one, ie, a python class that doesn't dynamically add new
attributes. Hence, for the class
%feature("static") A;
%pythonnondynamic A;
struct A
{
int a;
@ -19,11 +19,11 @@
aa.b = 1 # Ok
aa.c = 3 # error
Since "static" is a feature, if you use
Since "nondynamic" is a feature, if you use
%feature("static");
%pythonnondynamic;
it will make all the wrapped class static ones.
it will make all the wrapped class nondynamic ones.
The implementation is based on the recipe:
@ -35,9 +35,8 @@
//%pythonnondynamic(1);
%pythonnondynamic(1) A;
%pythonnondynamic(0) C;
%pythonnondynamic A;
%pythondynamic C;
%inline %{