diff options
author | Nicola Pero <nicola.pero@meta-innovation.com> | 2010-10-13 00:15:43 +0000 |
---|---|---|
committer | Nicola Pero <nicola@gcc.gnu.org> | 2010-10-13 00:15:43 +0000 |
commit | ad49efbd54ff6652837998463068e426584e9208 (patch) | |
tree | b79367b362926e98978a2c7ae810dcb0a436627b /libobjc/methods.c | |
parent | c994cc85bd7242a8b59b359bad02af74d166bf85 (diff) | |
download | gcc-ad49efbd54ff6652837998463068e426584e9208.zip gcc-ad49efbd54ff6652837998463068e426584e9208.tar.gz gcc-ad49efbd54ff6652837998463068e426584e9208.tar.bz2 |
In libobjc/: 2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
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.
From-SVN: r165404
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 c6236a1..65939a6 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; |