Remove long-deprecated %attribute_ref

This was deprecated in 1.3.32 which was released in 2007.
This commit is contained in:
Olly Betts 2023-12-01 12:01:48 +13:00
parent 88c2715154
commit fb2ce4ca72
3 changed files with 4 additions and 12 deletions

View File

@ -468,6 +468,8 @@ Version 4.2.0 (in progress)
them replacements are noted below:
%addmethods Use %extend instead.
%attribute_ref Use %attributeref instead (NB: If called with
4 parameters, the 3rd and 4th need switching).
%disabledoc Use Doxygen support instead.
%doconly Use Doxygen support instead.
%enabledoc Use Doxygen support instead.

View File

@ -6,8 +6,8 @@
%include attribute.i
class Foo;
%attribute_ref(test::Foo, test::A& , AsA);
%attribute_ref(test::Foo, long, AsLong);
%attributeref(test::Foo, test::A&, AsA);
%attributeref(test::Foo, long, AsLong);
%inline %{

View File

@ -102,16 +102,6 @@
#endif
%enddef
// deprecated (same as %attributeref, but there is an argument order inconsistency)
%define %attribute_ref(Class, AttributeType, AccessorMethod, AttributeName...)
#if #AttributeName != ""
%attribute_custom(%arg(Class), %arg(AttributeType), AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
#else
%attribute_custom(%arg(Class), %arg(AttributeType), AccessorMethod, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
#endif
%enddef
%define %attributeval(Class, AttributeType, AttributeName, GetMethod, SetMethod...)
%{
#define %mangle(Class) ##_## AttributeName ## _get(self_) new AttributeType(self_->GetMethod())