add attribute.i for other languages that don't use the unified typemap library
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a503a53533
commit
db4f2f71a1
2 changed files with 23 additions and 7 deletions
|
|
@ -1,9 +1,3 @@
|
|||
%{
|
||||
#include <stdio.h>
|
||||
%}
|
||||
|
||||
%include <typemaps/swigmacros.swg>
|
||||
|
||||
/*
|
||||
Attribute implementation using JOHN E LENZ ideas.
|
||||
|
||||
|
|
@ -79,6 +73,10 @@
|
|||
|
||||
*/
|
||||
|
||||
#ifndef %attribute_exception
|
||||
#define %attribute_exception(code,msg) SWIG_exception(code,msg)
|
||||
#endif
|
||||
|
||||
//
|
||||
// Define SWIG_ATTRIBUTE_TEMPLATE if you want to use templates.
|
||||
//
|
||||
|
|
@ -130,10 +128,11 @@
|
|||
#else
|
||||
%_attribute(%arg(Class), Wrap, %arg(type),
|
||||
attr, _t->get(),
|
||||
SWIG_exception(SWIG_AttributeError,"read-only 'attr' attribute");)
|
||||
%attribute_exception(SWIG_AttributeError,"read-only 'attr' attribute");)
|
||||
#endif
|
||||
%enddef
|
||||
|
||||
|
||||
%define %_attribute_ref_T(Class, Wrap, type, refname, attr)
|
||||
%ignore Class::refname();
|
||||
%ignore Class::refname() const;
|
||||
|
|
@ -160,3 +159,5 @@
|
|||
%define %attribute_ref(Class, type, refname, _Type...)
|
||||
%attribute_ref_T(%arg(Class), %mangle(Class), %arg(type), refname, _Type)
|
||||
%enddef
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue