[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically added properties problem

From: Luboš Doležel
Subject: Re: Dynamically added properties problem
Date: Tue, 16 Oct 2012 20:59:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

On 10/16/2012 07:32 PM, David Chisnall wrote:
Hi Luboš,

The property metadata stored by clang was designed to be enough to
support the introspection APIs that existed when it was designed.
Unfortunately, Apple then added property_getAttributes(), which just
dumps the Apple runtime's internal representation of the format.
This isn't really extensible, because any parser written for it now
may break in the future - we should have learned that lesson for type
encodings, where it's incredibly hard to add new types sensibly (see
the block type encoding fiasco) without breaking all existing code
that uses them.

I've now modified clang to generate this string if
-fobjc-runtime=gnustep-1.6 or greater.  This relies on logic that in
the runtime was not present in 1.5, so is not enabled for older



thanks, but that still leaves the problem of broken class_addProperty()

This function should allow me to do (pseudocode):

class_addProperty(someClass, "propertyName", {"V",
"someVeryDifferentIvarName"}, 1);

which will currently return NO. I've looked at
and nothing has changed to that end.

The code still assumes that property name == ivar name ("V").


reply via email to

[Prev in Thread] Current Thread [Next in Thread]