summaryrefslogtreecommitdiff
path: root/libobjc/selector.c
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-14 21:57:31 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-14 21:57:31 +0000
commitb32412164c0fa060262ba4f8bc287749b2c17bab (patch)
tree950f2298d177e5fa36931f0eeb4ffb6aee7d0ff3 /libobjc/selector.c
parent9d4543877b3f260a3f2ff25a2e6c094112db659e (diff)
downloadgcc-b32412164c0fa060262ba4f8bc287749b2c17bab.tar.gz
2010-12-14 Nicola Pero <nicola.pero@meta-innovation.com>
* objects.c (object_copy): Do not #undef as we are no longer including objc/objc-api.h. * selector.c: Include objc/runtime.h and objc-private/module-abi-8.h. Do not include objc/objc-api.h and objc/encoding.h. Updated (__objc_register_selectors_from_class): Use struct objc_method_list * instead of MethodList_t. (__objc_register_selectors_from_list): Use Method instead of Method_t. (struct objc_method_description_list): Do not define here. (__objc_register_instance_methods_to_class): Use struct objc_method_list * instead of MethodList_t and Method instead of Method_t. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167818 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/selector.c')
-rw-r--r--libobjc/selector.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/libobjc/selector.c b/libobjc/selector.c
index 582dc550d6e..0e51e31b132 100644
--- a/libobjc/selector.c
+++ b/libobjc/selector.c
@@ -23,13 +23,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "objc-private/common.h"
-#include "objc/objc-api.h"
+#include "objc/runtime.h"
#include "objc/thr.h"
#include "objc-private/hash.h"
-#include "objc-private/objc-list.h"
+#include "objc-private/objc-list.h"
+#include "objc-private/module-abi-8.h"
#include "objc-private/runtime.h"
#include "objc-private/sarray.h"
-#include "objc/encoding.h"
/* Initial selector hash table size. Value doesn't matter much. */
#define SELECTOR_HASH_SIZE 128
@@ -57,7 +57,7 @@ void __objc_init_selector_tables (void)
void
__objc_register_selectors_from_class (Class class)
{
- MethodList_t method_list;
+ struct objc_method_list * method_list;
method_list = class->methods;
while (method_list)
@@ -75,14 +75,14 @@ __objc_register_selectors_from_class (Class class)
The name and type pointers in the method list must be permanent and
immutable. */
void
-__objc_register_selectors_from_list (MethodList_t method_list)
+__objc_register_selectors_from_list (struct objc_method_list *method_list)
{
int i = 0;
objc_mutex_lock (__objc_runtime_mutex);
while (i < method_list->method_count)
{
- Method_t method = &method_list->method_list[i];
+ Method method = &method_list->method_list[i];
if (method->method_name)
{
method->method_name
@@ -94,15 +94,6 @@ __objc_register_selectors_from_list (MethodList_t method_list)
objc_mutex_unlock (__objc_runtime_mutex);
}
-/* Temporary definition while we include objc/objc-api.h instead of
- objc-private/module-abi-8.h. It should go away once we include
- module-abi-8.h. */
-struct objc_method_description_list
-{
- int count;
- struct objc_method_description list[1];
-};
-
/* The same as __objc_register_selectors_from_list, but works on a
struct objc_method_description_list* instead of a struct
objc_method_list*. This is only used for protocols, which have
@@ -131,11 +122,11 @@ __objc_register_selectors_from_description_list
/* Register instance methods as class methods for root classes. */
void __objc_register_instance_methods_to_class (Class class)
{
- MethodList_t method_list;
- MethodList_t class_method_list;
+ struct objc_method_list *method_list;
+ struct objc_method_list *class_method_list;
int max_methods_no = 16;
- MethodList_t new_list;
- Method_t curr_method;
+ struct objc_method_list *new_list;
+ Method curr_method;
/* Only if a root class. */
if (class->super_class)
@@ -156,7 +147,7 @@ void __objc_register_instance_methods_to_class (Class class)
/* Iterate through the methods from this method list. */
for (i = 0; i < method_list->method_count; i++)
{
- Method_t mth = &method_list->method_list[i];
+ Method mth = &method_list->method_list[i];
if (mth->method_name
&& ! search_for_method_in_list (class_method_list,
mth->method_name))