Fix all attributes macroses

This commit is contained in:
Artem Serebriyskiy 2013-05-24 13:34:37 +04:00 committed by William S Fulton
commit 3357ee85cd

View file

@ -195,42 +195,42 @@
%define %attribute(Class, AttributeType, AttributeName, GetMethod, SetMethod...)
#if #SetMethod != ""
%attribute_custom(Class, AttributeType, AttributeName, GetMethod, SetMethod, self_->GetMethod(), self_->SetMethod(val_))
%attribute_custom(%arg(Class), AttributeType, AttributeName, GetMethod, SetMethod, self_->GetMethod(), self_->SetMethod(val_))
#else
%attribute_readonly(Class, AttributeType, AttributeName, GetMethod, self_->GetMethod())
%attribute_readonly(%arg(Class), AttributeType, AttributeName, GetMethod, self_->GetMethod())
#endif
%enddef
%define %attribute2(Class, AttributeType, AttributeName, GetMethod, SetMethod...)
#if #SetMethod != ""
%attribute_custom(Class, AttributeType, AttributeName, GetMethod, SetMethod, &self_->GetMethod(), self_->SetMethod(*val_))
%attribute_custom(%arg(Class), AttributeType, AttributeName, GetMethod, SetMethod, &self_->GetMethod(), self_->SetMethod(*val_))
#else
%attribute_readonly(Class, AttributeType, AttributeName, GetMethod, &self_->GetMethod())
%attribute_readonly(%arg(Class), AttributeType, AttributeName, GetMethod, &self_->GetMethod())
#endif
%enddef
%define %attributeref(Class, AttributeType, AttributeName, AccessorMethod...)
#if #AccessorMethod != ""
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
#else
%attribute_custom(Class, AttributeType, AttributeName, AttributeName, AttributeName, self_->AttributeName(), self_->AttributeName() = val_)
%attribute_custom(%arg(Class), AttributeType, AttributeName, AttributeName, AttributeName, self_->AttributeName(), self_->AttributeName() = val_)
#endif
%enddef
%define %attribute2ref(Class, AttributeType, AttributeName, AccessorMethod...)
#if #AccessorMethod != ""
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, &self_->AccessorMethod(), self_->AccessorMethod() = *val_)
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, &self_->AccessorMethod(), self_->AccessorMethod() = *val_)
#else
%attribute_custom(Class, AttributeType, AccessorName, AccessorName, AccessorName, &self_->AccessorName(), self_->AccessorName() = *val_)
%attribute_custom(%arg(Class), AttributeType, AccessorName, AccessorName, AccessorName, &self_->AccessorName(), self_->AccessorName() = *val_)
#endif
%enddef
// deprecated (same as %attributeref, but there is an argument order inconsistency)
%define %attribute_ref(Class, AttributeType, AccessorMethod, AttributeName...)
#if #AttributeName != ""
%attribute_custom(Class, AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
%attribute_custom(%arg(Class), AttributeType, AttributeName, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
#else
%attribute_custom(Class, AttributeType, AccessorMethod, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
%attribute_custom(%arg(Class), AttributeType, AccessorMethod, AccessorMethod, AccessorMethod, self_->AccessorMethod(), self_->AccessorMethod() = val_)
#endif
%enddef