Overview
| Comment: | Make typeEncoding a const char* in OFIntrospection. |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
430222609a269bc9b869e2b229270f6c |
| User & Date: | js on 2011-07-29 20:35:34 |
| Other Links: | manifest | tags |
Context
|
2011-07-29
| ||
| 21:34 | OFConstantString: -[completeInitialization] -> -[finishInitialization]. (check-in: 2caeadf65a user: js tags: trunk) | |
| 20:35 | Make typeEncoding a const char* in OFIntrospection. (check-in: 430222609a user: js tags: trunk) | |
|
2011-07-28
| ||
| 22:21 | Don't create and release a pool in -[enumerateObjectsUsingBlock:]. (check-in: 3b0699b790 user: js tags: trunk) | |
Changes
Modified src/OFIntrospection.h from [ee956bd7fd] to [f2d1bab891].
| ︙ | ︙ | |||
23 24 25 26 27 28 29 |
/**
* \brief A class for describing a method.
*/
@interface OFMethod: OFObject
{
SEL selector;
OFString *name;
| | | | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
/**
* \brief A class for describing a method.
*/
@interface OFMethod: OFObject
{
SEL selector;
OFString *name;
const char *typeEncoding;
}
#ifdef OF_HAVE_PROPERTIES
@property (readonly) SEL selector;
@property (readonly, copy) OFString *name;
@property (readonly) const char *typeEncoding;
#endif
/**
* \brief Returns the selector of the method.
*
* \return The selector of the method
*/
|
| ︙ | ︙ | |||
51 52 53 54 55 56 57 | - (OFString*)name; /** * \brief Returns the type encoding for the method. * * \return The type encoding for the method */ | | | 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 |
- (OFString*)name;
/**
* \brief Returns the type encoding for the method.
*
* \return The type encoding for the method
*/
- (const char*)typeEncoding;
@end
/**
* \brief A class for introspecting classes.
*/
@interface OFIntrospection: OFObject
{
|
| ︙ | ︙ |
Modified src/OFIntrospection.m from [fa560f7e6a] to [e9f75e8e35].
| ︙ | ︙ | |||
35 36 37 38 39 40 41 |
{
self = [super init];
@try {
selector = method_getName(method);
name = [[OFString alloc]
initWithCString: sel_getName(selector)];
| < | < | < | | | | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
{
self = [super init];
@try {
selector = method_getName(method);
name = [[OFString alloc]
initWithCString: sel_getName(selector)];
typeEncoding = method_getTypeEncoding(method);
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
#elif defined(OF_OLD_GNU_RUNTIME)
- _initWithMethod: (Method_t)method
{
self = [super init];
@try {
selector = method->method_name;
name = [[OFString alloc]
initWithCString: sel_get_name(selector)];
typeEncoding = method->method_types;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
#endif
- (void)dealloc
{
[name release];
[super dealloc];
}
- (SEL)selector
{
return selector;
}
- (OFString*)name
{
OF_GETTER(name, YES)
}
- (const char*)typeEncoding
{
return typeEncoding;
}
- (OFString*)description
{
return [OFString stringWithFormat: @"<OFMethod: %@ [%s]>",
name, typeEncoding];
}
@end
@implementation OFIntrospection
+ introspectionWithClass: (Class)class
{
|
| ︙ | ︙ |