diff options
author | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-15 10:35:00 +0000 |
---|---|---|
committer | nicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-15 10:35:00 +0000 |
commit | 1e13b8762fd121ad1d83c8ceb22b8f9dfb98d18c (patch) | |
tree | 25c0b3362de3f254c6fe9987ea63d4a668631f87 /libobjc/objc | |
parent | 0ba90dfe7ae02bd83235d470f23f095c3ef1eab1 (diff) | |
download | gcc-1e13b8762fd121ad1d83c8ceb22b8f9dfb98d18c.tar.gz |
In libobjc/:
2010-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
* init.c (__objc_init_protocol): New function which fixes up a
protocol's class pointer, registers it with the runtime, register
all protocol selectors and registers associated protocols too.
(objc_init_statics): Detect if we are initializing protocols, and
if so, use __objc_init_protocol instead of only fixing up the
class pointer.
(__objc_init_protocls): Use __objc_init_protocol.
* objc-private/module-abi-8.h: Updated comments.
* objc-private/runtime.h
(__objc_register_selectors_from_description_list): New.
* selector.c (__objc_register_selectors_from_description_list):
New. (struct objc_method_description_list): Declare.
* Protocol.m ([-descriptionForInstanceMethod:]): Use sel_get_name
when accessing the name of a method, which is now correctly a SEL.
([-descriptionForClassMethod:]): Same change.
* protocols.c (protocol_getMethodDescription): Same change.
* objc/runtime.h: Updated comments.
(sel_registerTypedName): Fixed typo in function name.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165499 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/objc')
-rw-r--r-- | libobjc/objc/runtime.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libobjc/objc/runtime.h b/libobjc/objc/runtime.h index 43ef9b90984..938033148ae 100644 --- a/libobjc/objc/runtime.h +++ b/libobjc/objc/runtime.h @@ -195,7 +195,7 @@ objc_EXPORT SEL sel_registerName (const char *name); Compatibility Note: the Apple/NeXT runtime has untyped selectors, so it does not have this function, which is specific to the GNU Runtime. */ -objc_EXPORT SEL set_registerTypedName (const char *name, const char *type); +objc_EXPORT SEL sel_registerTypedName (const char *name, const char *type); /* Return YES if first_selector is the same as second_selector, and NO if not. */ @@ -505,7 +505,7 @@ objc_EXPORT Method * class_copyMethodList (Class class_, unsigned int *numberOfR objc_EXPORT unsigned int method_getNumberOfArguments (Method method); /* Return the string encoding for the return type of method 'method'. - The string is a standard NULL-terminated string in an area of + The string is a standard zero-terminated string in an area of memory allocated with malloc(); you should free it with free() when you finish using it. Return an empty string if method is NULL. */ objc_EXPORT char * method_copyReturnType (Method method); @@ -513,7 +513,7 @@ objc_EXPORT char * method_copyReturnType (Method method); /* Return the string encoding for the argument type of method 'method', argument number 'argumentNumber' ('argumentNumber' is 0 for self, 1 for _cmd, and 2 or more for the additional arguments if - any). The string is a standard NULL-terminated string in an area + any). The string is a standard zero-terminated string in an area of memory allocated with malloc(); you should free it with free() when you finish using it. Return an empty string if method is NULL or if 'argumentNumber' refers to a non-existing argument. */ @@ -524,10 +524,10 @@ objc_EXPORT char * method_copyArgumentType (Method method, unsigned int argument 'returnValue' string, which is of size 'returnValueSize'. No more than 'returnValueSize' characters are copied; if the encoding is smaller than 'returnValueSize', the rest of 'returnValue' is filled - with NULLs. If it is bigger, it is truncated (and would not be - NULL-terminated). You should supply a big enough + with zeros. If it is bigger, it is truncated (and would not be + zero-terminated). You should supply a big enough 'returnValueSize'. If the method is NULL, returnValue is set to a - string of NULLs. */ + string of zeros. */ objc_EXPORT void method_getReturnType (Method method, char *returnValue, size_t returnValueSize); @@ -538,10 +538,10 @@ objc_EXPORT void method_getReturnType (Method method, char *returnValue, 'returnValue' string, which is of size 'returnValueSize'. No more than 'returnValueSize' characters are copied; if the encoding is smaller than 'returnValueSize', the rest of 'returnValue' is filled - with NULLs. If it is bigger, it is truncated (and would not be - NULL-terminated). You should supply a big enough + with zeros. If it is bigger, it is truncated (and would not be + zero-terminated). You should supply a big enough 'returnValueSize'. If the method is NULL, returnValue is set to a - string of NULLs. */ + string of zeros. */ objc_EXPORT void method_getArgumentType (Method method, unsigned int argumentNumber, char *returnValue, size_t returnValueSize); |