gnustep-dev
[Top][All Lists]
Advanced

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

Fwd: Bug: libobjc2 property name introspection.


From: Maxthon Chan
Subject: Fwd: Bug: libobjc2 property name introspection.
Date: Wed, 10 Apr 2013 00:34:15 +0800

Sorry, messed up again.

下面是被转发的邮件:

发件人: Maxthon Chan <address@hidden>
主题: 回复: Bug: libobjc2 property name introspection.
日期: 2013年4月10日 GMT+0800上午12时33分52秒
收件人: David Chisnall <address@hidden>

Here is one, exposes this bug well:

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

@interface TFoo : NSObject

@property id foo;
@property id bar;

- (id)method:(id)arg;
- (id)method2;

@end

@implementation TFoo

@end

int main(void)
{
unsigned int count = 0;
objc_property_t *properties = class_copyPropertyList([TFoo class], &count);
for (NSUInteger i = 0; i < count; i++)
{
printf("%s\n", property_getName(properties[i]));
}
free(properties);
}

To compile, use:

clang `gnustep-config --objc-flags` `gnustep-config --base-libs` -fobjc-nonfragile-abi -Xclang -fobjc-default-synthesize-properties -fobjc-arc test.m -o test

在 2013-4-10,上午12:23,David Chisnall <address@hidden> 写道:

To clarify:

A simple test case is one that is a single file that I can compile, with no dependencies other than the runtime, and which prints some output that is obviously right or wrong, or which asset()s the correct output.

David

On 9 Apr 2013, at 17:19, Maxthon Chan <address@hidden> wrote:

I will just copy/paste some code from my actual project. Compile without -DGNUSTEP:


[ big blob of stuff omitted ]


在 2013-4-10,上午12:13,David Chisnall <address@hidden> 写道:

Please send me a (simple) test case.

David

On 9 Apr 2013, at 17:10, Maxthon Chan <address@hidden> wrote:

When I enumerate a class for all its properties and querying its name, the name of last property is always cobbled. I have to use some "quick & dirty" way (i.e add a dummy property at the end) to prevent this from affecting. OS X does not have this issue, though.

Can anyone figure out what is wrong?
_______________________________________________
Gnustep-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/gnustep-dev






reply via email to

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