aboutsummaryrefslogtreecommitdiff
path: root/libobjc/methods.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-10-13 00:15:43 +0000
committerNicola Pero <nicola.pero@meta-innovation.com>2010-10-13 00:15:43 +0000
commit6e50d75c6b770c34d9883308e9594bff0f45ac36 (patch)
treeb79367b362926e98978a2c7ae810dcb0a436627b /libobjc/methods.c
parent4c5a9e934ad6ae1091018acef0558f8374f11d8b (diff)
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: https://gcc.gnu.org/svn/gcc/trunk@165404 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/methods.c')
-rw-r--r--libobjc/methods.c20
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;