diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-13 00:15:43 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-13 00:15:43 +0000 |
commit | 0f7745af7b5912921854050f364202e587265def (patch) | |
tree | b79367b362926e98978a2c7ae810dcb0a436627b /libobjc/methods.c | |
parent | eda7c0d61500638fb901ebf72f38229d896b0bba (diff) | |
download | gcc-0f7745af7b5912921854050f364202e587265def.tar.gz |
In libobjc/:
2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
* encoding.c (method_copyReturnType): New.
(method_copyArgumentType): New.
(method_getReturnType): New.
(method_getArgumentType): New.
* methods.c (method_getDescription): New.
* objc/runtime.h (method_copyReturnType): New.
(method_copyArgumentType): New.
(method_getReturnType): New.
(method_getArgumentType): New.
(method_getDescription): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/methods.c')
-rw-r--r-- | libobjc/methods.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libobjc/methods.c b/libobjc/methods.c index c6236a100e7..65939a6d5cd 100644 --- a/libobjc/methods.c +++ b/libobjc/methods.c @@ -29,7 +29,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #include "objc-private/runtime.h" /* For __objc_runtime_mutex. */ #include <stdlib.h> /* For malloc. */ -SEL method_getName (struct objc_method * method) +SEL +method_getName (struct objc_method * method) { if (method == NULL) return NULL; @@ -37,7 +38,8 @@ SEL method_getName (struct objc_method * method) return method->method_name; } -const char * method_getTypeEncoding (struct objc_method * method) +const char * +method_getTypeEncoding (struct objc_method * method) { if (method == NULL) return NULL; @@ -45,7 +47,8 @@ const char * method_getTypeEncoding (struct objc_method * method) return method->method_types; } -IMP method_getImplementation (struct objc_method * method) +IMP +method_getImplementation (struct objc_method * method) { if (method == NULL) return NULL; @@ -53,7 +56,16 @@ IMP method_getImplementation (struct objc_method * method) return method->method_imp; } -struct objc_method ** class_copyMethodList (Class class_, unsigned int *numberOfReturnedMethods) +struct objc_method_description * +method_getDescription (struct objc_method * method) +{ + /* Note that the following returns NULL if method is NULL, which is + fine. */ + return (struct objc_method_description *)method; +} + +struct objc_method ** +class_copyMethodList (Class class_, unsigned int *numberOfReturnedMethods) { unsigned int count = 0; struct objc_method **returnValue = NULL; |