Patch #1797133 from David Piepgrass fixes %attribute when the getter has the same name as the attribute name and no longer generate non-functional setter for read-only attributes.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9990 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2007-10-15 21:57:51 +00:00
commit acb5bde28c
3 changed files with 131 additions and 82 deletions

View file

@ -1,7 +1,14 @@
%module li_attribute
%include exception.i
%include attribute.i
%include <exception.i>
//#define SWIG_ATTRIBUTE_TEMPLATE
%include <attribute.i>
%{
// forward reference needed if using SWIG_ATTRIBUTE_TEMPLATE
class A;
%}
%attribute(A, int, a, get_a, set_a);
%attribute_ref(A, int, b);