aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc
diff options
context:
space:
mode:
authornicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 19:37:35 +0000
committernicola <nicola@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 19:37:35 +0000
commit72c46466254abea849018bd045b531b677bffb8d (patch)
treed40a3876f7d42510a372e2033d14443ddb800f2a /libobjc/objc
parent901a9d428e1f22c1e70415ae2d992a2247a7a714 (diff)
In libobjc/:
2011-06-07 Nicola Pero <nicola.pero@meta-innovation.com> Removed the Traditional Objective-C runtime public API. * Makefile.in (OBJC_DEPRECATED_H): Variable removed. (install-headers): Do not create the objc/deprecated directory and do not install the deprecated headers. (OBJC_H): Removed encoding.h and objc-api.h. * Object.m: Removed all methods with the exception of -class and -isEqual:. Updated includes. ([-class]): Use Modern API. * objc/Object.h: Do not include deprecated/Object.h. * objc/deprecated/Object.h: Removed. * linking.m (__objc_linking): Call [Object class] instead of [Object name]. * Protocol.m: Removed all methods with the exception of -isEqual:. Updated includes. * objc/Protocol.h: Do not include deprecated/Protocol.h. * objc/deprecated/Protocol.h: Removed. * objc/deprecated/struct_objc_symtab.h: Removed. * objc/deprecated/struct_objc_module.h: Removed. * objc/deprecated/struct_objc_ivar.h: Removed. * objc/deprecated/struct_objc_ivar_list.h: Removed. * objc/deprecated/struct_objc_method.h: Removed. * objc/deprecated/struct_objc_method_list.h: Removed. * objc/deprecated/struct_objc_protocol_list.h: Removed. * objc/deprecated/struct_objc_category.h: Removed. * objc/deprecated/MetaClass.h: Removed. * objc/deprecated/objc_msg_sendv.h: Removed. * objc/deprecated/README: Removed. * objc/deprecated/struct_objc_class.h: Removed. * objc/deprecated/struct_objc_protocol.h: Removed. * objc/deprecated/struct_objc_selector.h: Removed. * objc/encoding.h: Removed. * objc/message.h (struct objc_super): Removed the definition for the Traditional Objective-C runtime API. * objc/objc.h: Do not include objc/objc-decls.h. deprecated/struct_objc_selector.h, deprecated/MetaClass.h, deprecated/struct_objc_class.h, deprecated/struct_objc_protocol.h and deprecated/objc_msg_sendv.h. Uncommented new definition of Protocol *. * objc/objc-api.h: Removed. * objc/runtime.h: Updated comments. Removed check to detect concurrent usage of Traditional and Modern APIs. * objc-private/module-abi-8.h: Always define struct objc_class and struct objc_protocol. (struct objc_protocol_list): Changed type of 'list' argument from 'Protocol *' to 'struct objc_protocol *'. (class_get_instance_size): Added. * objc-private/protocols.h (__objc_protocols_add_protocol): Take a 'struct objc_protocol *' as argument, not a 'Protocol *'. * objc-private/runtime.h: Updated comments. * objc-private/selector.h (struct objc_selector, sel_eq): Added. * class.c: Include objc-private/selector.h. (objc_get_meta_class): Return a Class instead of a MetaClass. * encoding.c (method_get_next_argument): Removed. (method_get_first_argument): Removed. (method_get_nth_argument): Removed. * gc.c: Include objc/runtime.h instead of objc/encoding.h. Include objc-private/module-abi-8.h and ctype.h. * protocols.c (__objc_protocols_add_protocol): Take a 'struct objc_protocl *' as argument, not a 'Protocol *'. (class_addProtocol): Added casts to 'struct objc_protocol *' and 'Protocol *'. (class_copyProtocolList): Likewise. (protocol_conformsToProtocol): Likewise. (protocol_copyProtocolList): Likewise. * sarray.c: Include objc-private/module-abi-8.h. * sendmsg.c (method_get_next_argument): Removed. (method_get_first_argument): Removed. (method_get_nth_argument): Removed. (objc_msg_sendv): Removed. (arglist_t, retval_t): New. (class_get_class_method): Take a 'Class', not 'MetaClass', argument. * thr.c: Include module-abi-8.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libobjc/objc')
-rw-r--r--libobjc/objc/Object.h4
-rw-r--r--libobjc/objc/Protocol.h2
-rw-r--r--libobjc/objc/deprecated/MetaClass.h1
-rw-r--r--libobjc/objc/deprecated/Object.h63
-rw-r--r--libobjc/objc/deprecated/Protocol.h13
-rw-r--r--libobjc/objc/deprecated/README11
-rw-r--r--libobjc/objc/deprecated/objc_msg_sendv.h12
-rw-r--r--libobjc/objc/deprecated/struct_objc_category.h21
-rw-r--r--libobjc/objc/deprecated/struct_objc_class.h56
-rw-r--r--libobjc/objc/deprecated/struct_objc_ivar.h15
-rw-r--r--libobjc/objc/deprecated/struct_objc_ivar_list.h10
-rw-r--r--libobjc/objc/deprecated/struct_objc_method.h22
-rw-r--r--libobjc/objc/deprecated/struct_objc_method_list.h9
-rw-r--r--libobjc/objc/deprecated/struct_objc_module.h24
-rw-r--r--libobjc/objc/deprecated/struct_objc_protocol.h6
-rw-r--r--libobjc/objc/deprecated/struct_objc_protocol_list.h5
-rw-r--r--libobjc/objc/deprecated/struct_objc_selector.h20
-rw-r--r--libobjc/objc/deprecated/struct_objc_symtab.h26
-rw-r--r--libobjc/objc/encoding.h117
-rw-r--r--libobjc/objc/message.h21
-rw-r--r--libobjc/objc/objc-api.h394
-rw-r--r--libobjc/objc/objc.h17
-rw-r--r--libobjc/objc/runtime.h22
23 files changed, 7 insertions, 884 deletions
diff --git a/libobjc/objc/Object.h b/libobjc/objc/Object.h
index 11c4617a98c..e2fa926e7b5 100644
--- a/libobjc/objc/Object.h
+++ b/libobjc/objc/Object.h
@@ -55,10 +55,6 @@ extern "C" {
- (BOOL)isEqual: (id)anObject;
@end
-/* All of the following includes were deprecated in GCC 4.6 and will
- be removed in the next release. */
-#include "deprecated/Object.h"
-
#ifdef __cplusplus
}
#endif
diff --git a/libobjc/objc/Protocol.h b/libobjc/objc/Protocol.h
index 1cf9892b272..f2b7b789630 100644
--- a/libobjc/objc/Protocol.h
+++ b/libobjc/objc/Protocol.h
@@ -47,8 +47,6 @@ extern "C" {
protocol_getMethodDescription()
*/
-#include "deprecated/Protocol.h"
-
#ifdef __cplusplus
}
#endif
diff --git a/libobjc/objc/deprecated/MetaClass.h b/libobjc/objc/deprecated/MetaClass.h
deleted file mode 100644
index 01597782c57..00000000000
--- a/libobjc/objc/deprecated/MetaClass.h
+++ /dev/null
@@ -1 +0,0 @@
-typedef struct objc_class *MetaClass;
diff --git a/libobjc/objc/deprecated/Object.h b/libobjc/objc/deprecated/Object.h
deleted file mode 100644
index d7924e04761..00000000000
--- a/libobjc/objc/deprecated/Object.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* The following methods were deprecated in GCC 4.6.0 and will be
- removed in the next GCC release. */
-@interface Object (Deprecated)
-/* Initializing classes and instances */
-+ initialize;
-- init;
-
-/* Creating, freeing, and copying instances */
-+ new;
-+ alloc;
-- free;
-- copy;
-- shallowCopy;
-- deepen;
-- deepCopy;
-
-/* Identifying classes */
-- (Class)superClass;
-- (MetaClass)metaClass;
-- (const char *)name;
-
-/* Identifying and comparing objects */
-- self;
-- (unsigned int)hash;
-- (int)compare:(id)anotherObject;
-
-/* Testing object type */
-- (BOOL)isMetaClass;
-- (BOOL)isClass;
-- (BOOL)isInstance;
-
-/* Testing inheritance relationships */
-- (BOOL)isKindOf:(Class)aClassObject;
-- (BOOL)isMemberOf:(Class)aClassObject;
-- (BOOL)isKindOfClassNamed:(const char *)aClassName;
-- (BOOL)isMemberOfClassNamed:(const char *)aClassName;
-
-/* Testing class functionality */
-+ (BOOL)instancesRespondTo:(SEL)aSel;
-- (BOOL)respondsTo:(SEL)aSel;
-
-/* Testing protocol conformance */
-- (BOOL)conformsTo:(Protocol*)aProtocol;
-
-/* Introspection */
-+ (IMP)instanceMethodFor:(SEL)aSel;
-- (IMP)methodFor:(SEL)aSel;
-+ (struct objc_method_description *)descriptionForInstanceMethod:(SEL)aSel;
-- (struct objc_method_description *)descriptionForMethod:(SEL)aSel;
-
-/* Forwarding */
-- (retval_t)performv:(SEL)aSel :(arglist_t)argFrame;
-
-/* Posing */
-+ poseAs:(Class)aClassObject;
-- (Class)transmuteClassTo:(Class)aClassObject;
-
-/* Archiving */
-+ (int)version;
-+ setVersion:(int)aVersion;
-
-@end
-
diff --git a/libobjc/objc/deprecated/Protocol.h b/libobjc/objc/deprecated/Protocol.h
deleted file mode 100644
index 7a77f51a0dd..00000000000
--- a/libobjc/objc/deprecated/Protocol.h
+++ /dev/null
@@ -1,13 +0,0 @@
-/* The following methods were deprecated in GCC 4.6.0 and will be
- removed in the next GCC release. */
-@interface Protocol (Deprecated)
-/* Obtaining attributes intrinsic to the protocol */
-- (const char *)name;
-
-/* Testing protocol conformance */
-- (BOOL) conformsTo: (Protocol *)aProtocolObject;
-
-/* Looking up information specific to a protocol */
-- (struct objc_method_description *) descriptionForInstanceMethod:(SEL)aSel;
-- (struct objc_method_description *) descriptionForClassMethod:(SEL)aSel;
-@end
diff --git a/libobjc/objc/deprecated/README b/libobjc/objc/deprecated/README
deleted file mode 100644
index 3f105196e63..00000000000
--- a/libobjc/objc/deprecated/README
+++ /dev/null
@@ -1,11 +0,0 @@
-This directory contains declarations and features that are deprecated
-and that will be removed in future versions of the compiler.
-
-Note that files in this directory are not really usable headers on
-their own - they shouldn't be included directly by end users. They
-are header fragments containing deprecated APIs that are still
-included (until removed) from the real headers in objc/.
-
-Files in this directory should not #include any other objc header.
-Any include that they need should be done in the real objc/ headers
-before including these fragments.
diff --git a/libobjc/objc/deprecated/objc_msg_sendv.h b/libobjc/objc/deprecated/objc_msg_sendv.h
deleted file mode 100644
index 825d9a76612..00000000000
--- a/libobjc/objc/deprecated/objc_msg_sendv.h
+++ /dev/null
@@ -1,12 +0,0 @@
-/* The following types and functions are provided only for
- backwards-compatibility and should not be used in new code. They
- were deprecated in GCC 4.6 and will be removed in the next
- release. */
-typedef void* retval_t; /* return value */
-typedef void(*apply_t)(void); /* function pointer */
-typedef union arglist {
- char *arg_ptr;
- char arg_regs[sizeof (char*)];
-} *arglist_t; /* argument frame */
-
-objc_EXPORT retval_t objc_msg_sendv(id, SEL, arglist_t);
diff --git a/libobjc/objc/deprecated/struct_objc_category.h b/libobjc/objc/deprecated/struct_objc_category.h
deleted file mode 100644
index 6de3980a905..00000000000
--- a/libobjc/objc/deprecated/struct_objc_category.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-** The compiler generates one of these structures for each category. A class
-** may have many categories and contain both instance and factory methods.
-*/
-struct objc_category {
- const char* category_name; /* Name of the category. Name
- contained in the () of the
- category definition. */
- const char* class_name; /* Name of the class to which
- the category belongs. */
- MethodList_t instance_methods; /* Linked list of instance
- methods defined in the
- category. NULL indicates no
- instance methods defined. */
- MethodList_t class_methods; /* Linked list of factory
- methods defined in the
- category. NULL indicates no
- class methods defined. */
- struct objc_protocol_list *protocols; /* List of Protocols
- conformed to */
-};
diff --git a/libobjc/objc/deprecated/struct_objc_class.h b/libobjc/objc/deprecated/struct_objc_class.h
deleted file mode 100644
index 07927feb69d..00000000000
--- a/libobjc/objc/deprecated/struct_objc_class.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* This structure used to be public, but is now private to the runtime. */
-#define __objc_STRUCT_OBJC_CLASS_defined
-
-/*
-** The compiler generates one of these structures for each class.
-**
-** This structure is the definition for classes.
-**
-** This structure is generated by the compiler in the executable and used by
-** the run-time during normal messaging operations. Therefore some members
-** change type. The compiler generates "char* const" and places a string in
-** the following member variables: super_class.
-*/
-struct objc_class {
- MetaClass class_pointer; /* Pointer to the class's
- meta class. */
- struct objc_class* super_class; /* Pointer to the super
- class. NULL for class
- Object. */
- const char* name; /* Name of the class. */
- long version; /* Unknown. */
- unsigned long info; /* Bit mask. See class masks
- defined above. */
- long instance_size; /* Size in bytes of the class.
- The sum of the class
- definition and all super
- class definitions. */
-#ifdef _WIN64
- /* We pad the structure manually to prevent warning when -Wpadded
- is used. The compiler automatically pads the structures that it
- generates, so this manually padded structure still matches the one
- generated by the compiler, but if we don't pad manually, -Wpadded
- detects that padding is being added and generates annoying warnings.
- This hack is necessary as on LLP64 targets sizeof (long) isn't equal
- to sizeof (void *). */
- long pad;
-#endif
- struct objc_ivar_list* ivars; /* Pointer to a structure that
- describes the instance
- variables in the class
- definition. NULL indicates
- no instance variables. Does
- not include super class
- variables. */
- struct objc_method_list* methods; /* Linked list of instance
- methods defined for the
- class. */
- struct sarray * dtable; /* Pointer to instance
- method dispatch table. */
- struct objc_class* subclass_list; /* Subclasses */
- struct objc_class* sibling_class;
-
- struct objc_protocol_list *protocols; /* Protocols conformed to */
- void* gc_object_type;
-};
-
diff --git a/libobjc/objc/deprecated/struct_objc_ivar.h b/libobjc/objc/deprecated/struct_objc_ivar.h
deleted file mode 100644
index 57170ad1160..00000000000
--- a/libobjc/objc/deprecated/struct_objc_ivar.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-** The compiler generates one of these structures for a class that has
-** instance variables defined in its specification.
-*/
-typedef struct objc_ivar {
- const char* ivar_name; /* Name of the instance
- variable as entered in the
- class definition. */
- const char* ivar_type; /* Description of the Ivar's
- type. Useful for
- debuggers. */
- int ivar_offset; /* Byte offset from the base
- address of the instance
- structure to the variable. */
-} *Ivar_t;
diff --git a/libobjc/objc/deprecated/struct_objc_ivar_list.h b/libobjc/objc/deprecated/struct_objc_ivar_list.h
deleted file mode 100644
index 8f5051fb967..00000000000
--- a/libobjc/objc/deprecated/struct_objc_ivar_list.h
+++ /dev/null
@@ -1,10 +0,0 @@
-typedef struct objc_ivar_list {
- int ivar_count; /* Number of structures (Ivar)
- contained in the list. One
- structure per instance
- variable defined in the
- class. */
- struct objc_ivar ivar_list[1]; /* Variable length
- structure. */
-} IvarList, *IvarList_t;
-
diff --git a/libobjc/objc/deprecated/struct_objc_method.h b/libobjc/objc/deprecated/struct_objc_method.h
deleted file mode 100644
index af83c07b6ff..00000000000
--- a/libobjc/objc/deprecated/struct_objc_method.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
-** The compiler generates one (or more) of these structures for a class that
-** has methods defined in its specification.
-**
-** The implementation of a class can be broken into separate pieces in a file
-** and categories can break them across modules. To handle this problem is a
-** singly linked list of methods.
-*/
-struct objc_method {
- SEL method_name; /* This variable is the method's
- name. It is a char*.
- The unique integer passed to
- objc_msg_send is a char* too.
- It is compared against
- method_name using strcmp. */
- const char* method_types; /* Description of the method's
- parameter list. Useful for
- debuggers. */
- IMP method_imp; /* Address of the method in the
- executable. */
-};
-
diff --git a/libobjc/objc/deprecated/struct_objc_method_list.h b/libobjc/objc/deprecated/struct_objc_method_list.h
deleted file mode 100644
index 5156cabbf2d..00000000000
--- a/libobjc/objc/deprecated/struct_objc_method_list.h
+++ /dev/null
@@ -1,9 +0,0 @@
-typedef struct objc_method_list {
- struct objc_method_list* method_next; /* This variable is used to link
- a method list to another. It
- is a singly linked list. */
- int method_count; /* Number of methods defined in
- this structure. */
- Method method_list[1]; /* Variable length
- structure. */
-} MethodList, *MethodList_t;
diff --git a/libobjc/objc/deprecated/struct_objc_module.h b/libobjc/objc/deprecated/struct_objc_module.h
deleted file mode 100644
index 57950851fae..00000000000
--- a/libobjc/objc/deprecated/struct_objc_module.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
-** The compiler generates one of these structures for each module that
-** composes the executable (eg main.m).
-**
-** This data structure is the root of the definition tree for the module.
-**
-** A collect program runs between ld stages and creates a ObjC ctor array.
-** That array holds a pointer to each module structure of the executable.
-*/
-typedef struct objc_module {
- unsigned long version; /* Version of the Module data structure. */
- unsigned long size; /* sizeof(Module) according to the compiler -
- only used to sanity check that it matches
- sizeof(Module) according to the
- runtime. */
- const char* name; /* Name of the file used to compile the
- module - not set by modern compilers for
- security reasons. */
- Symtab_t symtab; /* Pointer to the Symtab of the module. The
- Symtab holds an array of pointers to the
- classes and categories defined in the
- module. */
-} Module, *Module_t;
-
diff --git a/libobjc/objc/deprecated/struct_objc_protocol.h b/libobjc/objc/deprecated/struct_objc_protocol.h
deleted file mode 100644
index 5344e3f5493..00000000000
--- a/libobjc/objc/deprecated/struct_objc_protocol.h
+++ /dev/null
@@ -1,6 +0,0 @@
-typedef struct objc_protocol {
- struct objc_class* class_pointer;
- char *protocol_name;
- struct objc_protocol_list *protocol_list;
- struct objc_method_description_list *instance_methods, *class_methods;
-} Protocol;
diff --git a/libobjc/objc/deprecated/struct_objc_protocol_list.h b/libobjc/objc/deprecated/struct_objc_protocol_list.h
deleted file mode 100644
index 5e5788b5039..00000000000
--- a/libobjc/objc/deprecated/struct_objc_protocol_list.h
+++ /dev/null
@@ -1,5 +0,0 @@
-struct objc_protocol_list {
- struct objc_protocol_list *next;
- size_t count;
- Protocol *list[1];
-};
diff --git a/libobjc/objc/deprecated/struct_objc_selector.h b/libobjc/objc/deprecated/struct_objc_selector.h
deleted file mode 100644
index 34aaf0d8b4e..00000000000
--- a/libobjc/objc/deprecated/struct_objc_selector.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* This struct used to be public, but is now private to the runtime. */
-
-/*
-** Definition of a selector. Selectors themselves are not unique, but
-** the sel_id is a unique identifier.
-*/
-struct objc_selector
-{
- void *sel_id;
- const char *sel_types;
-};
-
-inline static BOOL
-sel_eq (SEL s1, SEL s2)
-{
- if (s1 == 0 || s2 == 0)
- return s1 == s2;
- else
- return s1->sel_id == s2->sel_id;
-}
diff --git a/libobjc/objc/deprecated/struct_objc_symtab.h b/libobjc/objc/deprecated/struct_objc_symtab.h
deleted file mode 100644
index 75bb27f1b55..00000000000
--- a/libobjc/objc/deprecated/struct_objc_symtab.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Whereas a Module (defined further down) is the root (typically) of a file,
- a Symtab is the root of the class and category definitions within the
- module.
-
- A Symtab contains a variable length array of pointers to classes and
- categories defined in the module. */
-typedef struct objc_symtab {
- unsigned long sel_ref_cnt; /* Unused (always set to 0). */
- SEL refs; /* The table of selectors referenced in
- this module. This is terminated by a
- selector with NULL sel_id and NULL
- sel_types. */
- unsigned short cls_def_cnt; /* Number of classes compiled
- (defined) in the module. */
- unsigned short cat_def_cnt; /* Number of categories
- compiled (defined) in the
- module. */
-
- void *defs[1]; /* Variable array of pointers.
- cls_def_cnt of type Class
- followed by cat_def_cnt of
- type Category_t, followed
- by a NULL terminated array
- of objc_static_instances. */
-} Symtab, *Symtab_t;
-
diff --git a/libobjc/objc/encoding.h b/libobjc/objc/encoding.h
deleted file mode 100644
index 7852466b824..00000000000
--- a/libobjc/objc/encoding.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* Encoding of types for Objective C.
- Copyright (C) 1993, 1997, 2002, 2004, 2009, 2010
- Free Software Foundation, Inc.
-
-Author: Kresten Krab Thorup
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-
-#ifndef __encoding_INCLUDE_GNU
-#define __encoding_INCLUDE_GNU
-
-/* This file is to be used with the "traditional" GNU Objective-C
- Runtime API (the one declared in objc/objc-api.h). If you are
- using the "modern" GNU Objective-C Runtime API, then the useful
- functions from this file are declared in objc/runtime.h. */
-
-#include "objc-api.h"
-#include <ctype.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* The following are used in encode strings to describe some
- qualifiers of method and ivar types. */
-#define _C_CONST 'r'
-#define _C_IN 'n'
-#define _C_INOUT 'N'
-#define _C_OUT 'o'
-#define _C_BYCOPY 'O'
-#define _C_BYREF 'R'
-#define _C_ONEWAY 'V'
-#define _C_GCINVISIBLE '|'
-
-/* The same when used as flags. */
-#define _F_CONST 0x01
-#define _F_IN 0x01
-#define _F_OUT 0x02
-#define _F_INOUT 0x03
-#define _F_BYCOPY 0x04
-#define _F_BYREF 0x08
-#define _F_ONEWAY 0x10
-#define _F_GCINVISIBLE 0x20
-
-int objc_sizeof_type (const char *type);
-int objc_alignof_type (const char *type);
-int objc_aligned_size (const char *type);
-int objc_promoted_size (const char *type);
-
-const char *objc_skip_type_qualifiers (const char *type);
-const char *objc_skip_typespec (const char *type);
-const char *objc_skip_offset (const char *type);
-const char *objc_skip_argspec (const char *type);
-unsigned objc_get_type_qualifiers (const char *type);
-
-/* The following functions are replaced, in the modern API, by
- method_getNumberOfArguments(), method_getArgumentType(). */
-int method_get_number_of_arguments (struct objc_method *);
-int method_get_sizeof_arguments (struct objc_method *);
-
-/* The following functions are deprecated and they use arglist_t which
- is deprecated. */
-char *method_get_first_argument (struct objc_method *,
- arglist_t argframe,
- const char **type);
-char *method_get_next_argument (arglist_t argframe,
- const char **type);
-char *method_get_nth_argument (struct objc_method *m,
- arglist_t argframe,
- int arg,
- const char **type);
-
-struct objc_struct_layout
-{
- const char *original_type;
- const char *type;
- const char *prev_type;
- unsigned int record_size;
- unsigned int record_align;
-};
-
-void objc_layout_structure (const char *type,
- struct objc_struct_layout *layout);
-BOOL objc_layout_structure_next_member (struct objc_struct_layout *layout);
-void objc_layout_finish_structure (struct objc_struct_layout *layout,
- unsigned int *size,
- unsigned int *align);
-void objc_layout_structure_get_info (struct objc_struct_layout *layout,
- unsigned int *offset,
- unsigned int *align,
- const char **type);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __encoding_INCLUDE_GNU */
diff --git a/libobjc/objc/message.h b/libobjc/objc/message.h
index 8d03fefe4b6..92b52633aa2 100644
--- a/libobjc/objc/message.h
+++ b/libobjc/objc/message.h
@@ -92,33 +92,12 @@ objc_EXPORT IMP objc_msg_lookup (id receiver, SEL op);
The compiler generates one of these structures and passes it to
objc_msg_lookup_super() when a [super method] call is compiled. */
-/* In the traditional API, the super class field is called 'class' in
- Objective-C and 'super_class' in Objective-C++. In the new API
- (objc/runtime.h) it is always called 'super_class'. We detect the
- "traditional API" by the fact that the objc/objc-api.h header
- include guards are defined, which means objc/objc-api.h has been
- included. This works because objc/message.h does not exist in the
- Traditional API and is only read because objc-api.h itself includes
- it. */
-#ifdef __objc_api_INCLUDE_GNU
-/* Traditional API. */
-typedef struct objc_super
-{
- id self; /* Id of the object sending the message. */
-#ifdef __cplusplus
- Class super_class;
-#else
- Class class; /* Object's super class. */
-#endif
-} Super, *Super_t;
-#else
/* Modern API. */
struct objc_super
{
id self; /* The receiver of the message. */
Class super_class; /* The superclass of the receiver. */
};
-#endif
/* This is used by the compiler instead of objc_msg_lookup () when
compiling a call to 'super', such as [super method]. This requires
diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h
deleted file mode 100644
index e6f6e26600d..00000000000
--- a/libobjc/objc/objc-api.h
+++ /dev/null
@@ -1,394 +0,0 @@
-/* GNU Objective-C Runtime API - Traditional API
- Copyright (C) 1993, 1995, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
- 2007, 2009, 2010 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by the
-Free Software Foundation; either version 3, or (at your option) any
-later version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT
-ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-License for more details.
-
-Under Section 7 of GPL version 3, you are granted additional
-permissions described in the GCC Runtime Library Exception, version
-3.1, as published by the Free Software Foundation.
-
-You should have received a copy of the GNU General Public License and
-a copy of the GCC Runtime Library Exception along with this program;
-see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
-<http://www.gnu.org/licenses/>. */
-
-#ifndef __objc_api_INCLUDE_GNU
-#define __objc_api_INCLUDE_GNU
-
-/* This file declares the "traditional" GNU Objective-C Runtime API.
- It is the API supported by older versions of the GNU Objective-C
- Runtime. Include this file to use it.
-
- This API is being replaced by the "modern" GNU Objective-C Runtime
- API, which is declared in objc/runtime.h. The "modern" API is very
- similar to the API used by the modern Apple/NeXT runtime.
-
- The last version of GCC supporting the traditional API is GCC 4.6.
- This file will not exist in later versions of GCC.
-
- Because the two APIs have some conflicting definitions (in
- particular, Method and Category are defined differently) you should
- include either objc/objc-api.h (to use the traditional GNU
- Objective-C Runtime API) or objc/runtime.h (to use the modern GNU
- Objective-C Runtime API), but not both. */
-#ifdef __objc_runtime_INCLUDE_GNU
-# error You can not include both objc/objc-api.h and objc/runtime.h. Include objc/objc-api.h for the traditional GNU Objective-C Runtime API and objc/runtime.h for the modern one.
-#endif
-
-/* TODO: A deprecation warning any time the file is included ? */
-
-#include "objc.h"
-#include "thr.h"
-#include "objc-decls.h"
-#include <stdio.h>
-#include <stdarg.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-/* Method descriptor returned by introspective Object methods.
- This is really just the first part of the more complete objc_method
- structure defined below and used internally by the runtime. */
-struct objc_method_description
-{
- SEL name; /* this is a selector, not a string */
- char *types; /* type encoding */
-};
-
-/* The following are used in encode strings to describe the type of
- Ivars and Methods. */
-#define _C_ID '@'
-#define _C_CLASS '#'
-#define _C_SEL ':'
-#define _C_CHR 'c'
-#define _C_UCHR 'C'
-#define _C_SHT 's'
-#define _C_USHT 'S'
-#define _C_INT 'i'
-#define _C_UINT 'I'
-#define _C_LNG 'l'
-#define _C_ULNG 'L'
-#define _C_LNG_LNG 'q'
-#define _C_ULNG_LNG 'Q'
-#define _C_FLT 'f'
-#define _C_DBL 'd'
-#define _C_LNG_DBL 'D'
-#define _C_BFLD 'b'
-#define _C_BOOL 'B'
-#define _C_VOID 'v'
-#define _C_UNDEF '?'
-#define _C_PTR '^'
-#define _C_CHARPTR '*'
-#define _C_ARY_B '['
-#define _C_ARY_E ']'
-#define _C_UNION_B '('
-#define _C_UNION_E ')'
-#define _C_STRUCT_B '{'
-#define _C_STRUCT_E '}'
-#define _C_VECTOR '!'
-#define _C_COMPLEX 'j'
-
-/* _C_ATOM is never generated by the compiler. You can treat it as
- equivalent to "*". */
-#define _C_ATOM '%'
-
-#include "deprecated/struct_objc_symtab.h"
-#include "deprecated/struct_objc_module.h"
-#include "deprecated/struct_objc_ivar.h"
-#include "deprecated/struct_objc_ivar_list.h"
-#include "deprecated/struct_objc_method.h"
-typedef struct objc_method Method, *Method_t;
-
-#include "deprecated/struct_objc_method_list.h"
-#include "deprecated/struct_objc_protocol_list.h"
-
-/*
-** This is used to assure consistent access to the info field of
-** classes
-*/
-#ifndef HOST_BITS_PER_LONG
-#define HOST_BITS_PER_LONG (sizeof(long)*8)
-#endif
-
-#define __CLS_INFO(cls) ((cls)->info)
-#define __CLS_ISINFO(cls, mask) ((__CLS_INFO(cls)&mask)==mask)
-#define __CLS_SETINFO(cls, mask) (__CLS_INFO(cls) |= mask)
-
-/* The structure is of type MetaClass */
-#define _CLS_META 0x2L
-#define CLS_ISMETA(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_META))
-
-
-/* The structure is of type Class */
-#define _CLS_CLASS 0x1L
-#define CLS_ISCLASS(cls) ((cls)&&__CLS_ISINFO(cls, _CLS_CLASS))
-
-/*
-** The class is initialized within the runtime. This means that
-** it has had correct super and sublinks assigned
-*/
-#define _CLS_RESOLV 0x8L
-#define CLS_ISRESOLV(cls) __CLS_ISINFO(cls, _CLS_RESOLV)
-#define CLS_SETRESOLV(cls) __CLS_SETINFO(cls, _CLS_RESOLV)
-
-/*
-** The class has been send a +initialize message or a such is not
-** defined for this class
-*/
-#define _CLS_INITIALIZED 0x04L
-#define CLS_ISINITIALIZED(cls) __CLS_ISINFO(cls, _CLS_INITIALIZED)
-#define CLS_SETINITIALIZED(cls) __CLS_SETINFO(cls, _CLS_INITIALIZED)
-
-/*
-** The class number of this class. This must be the same for both the
-** class and its meta class object
-*/
-#define CLS_GETNUMBER(cls) (__CLS_INFO(cls) >> (HOST_BITS_PER_LONG/2))
-#define CLS_SETNUMBER(cls, num) \
- ({ (cls)->info <<= (HOST_BITS_PER_LONG/2); \
- (cls)->info >>= (HOST_BITS_PER_LONG/2); \
- __CLS_SETINFO(cls, (((unsigned long)num) << (HOST_BITS_PER_LONG/2))); })
-
-#include "deprecated/struct_objc_category.h"
-
-typedef struct objc_category Category, *Category_t;
-
-/* We include message.h for compatibility with the old objc-api.h
- which included the declarations currently in message.h. The
- Apple/NeXT runtime does not do this and only includes message.h in
- objc-runtime.h. It does not matter that much since most of the
- definitions in message.h are runtime-specific. */
-#include "message.h"
-
-/*
-** This is a hook which is called by objc_lookup_class and
-** objc_get_class if the runtime is not able to find the class.
-** This may e.g. try to load in the class using dynamic loading.
-** The function is guaranteed to be passed a non-NULL name string.
-** In the Modern API, this is replaced by
-** objc_setGetUnknownClassHandler ().
-*/
-objc_EXPORT Class (*_objc_lookup_class)(const char *name);
-
-/*
-** This is a hook which is called by __objc_exec_class every time a class
-** or a category is loaded into the runtime. This may e.g. help a
-** dynamic loader determine the classes that have been loaded when
-** an object file is dynamically linked in.
-*/
-objc_EXPORT void (*_objc_load_callback)(Class _class, Category* category);
-
-/*
- Standard functions for memory allocation and disposal. Users should
- use these functions in their ObjC programs so that they work so that
- they work properly with garbage collectors.
-*/
-objc_EXPORT void *
-objc_malloc(size_t size);
-
-/* FIXME: Shouldn't the following be called objc_malloc_atomic ? The
- GC function is GC_malloc_atomic() which makes sense.
- */
-objc_EXPORT void *
-objc_atomic_malloc(size_t size);
-
-objc_EXPORT void *
-objc_realloc(void *mem, size_t size);
-
-objc_EXPORT void *
-objc_calloc(size_t nelem, size_t size);
-
-objc_EXPORT void
-objc_free(void *mem);
-
-objc_EXPORT Method_t class_get_class_method(MetaClass _class, SEL aSel);
-
-objc_EXPORT Method_t class_get_instance_method(Class _class, SEL aSel);
-
-objc_EXPORT Class class_pose_as(Class impostor, Class superclass);
-
-objc_EXPORT Class objc_get_class(const char *name);
-
-objc_EXPORT Class objc_lookup_class(const char *name);
-
-objc_EXPORT Class objc_next_class(void **enum_state);
-
-objc_EXPORT const char *sel_get_name(SEL selector);
-
-objc_EXPORT const char *sel_get_type(SEL selector);
-
-objc_EXPORT SEL sel_get_uid(const char *name);
-
-objc_EXPORT SEL sel_get_any_uid(const char *name);
-
-objc_EXPORT SEL sel_get_any_typed_uid(const char *name);
-
-objc_EXPORT SEL sel_get_typed_uid(const char *name, const char*);
-
-objc_EXPORT SEL sel_register_name(const char *name);
-
-objc_EXPORT SEL sel_register_typed_name(const char *name, const char*type);
-
-
-objc_EXPORT BOOL sel_is_mapped (SEL aSel);
-
-extern id class_create_instance(Class _class);
-
-static inline const char *
-class_get_class_name(Class _class)
-{
- return CLS_ISCLASS(_class)?_class->name:((_class==Nil)?"Nil":0);
-}
-
-static inline long
-class_get_instance_size(Class _class)
-{
- return CLS_ISCLASS(_class)?_class->instance_size:0;
-}
-
-static inline MetaClass
-class_get_meta_class(Class _class)
-{
- return CLS_ISCLASS(_class)?_class->class_pointer:Nil;
-}
-
-static inline Class
-class_get_super_class(Class _class)
-{
- return CLS_ISCLASS(_class)?_class->super_class:Nil;
-}
-
-static inline int
-class_get_version(Class _class)
-{
- return CLS_ISCLASS(_class)?_class->version:-1;
-}
-
-static inline BOOL
-class_is_class(Class _class)
-{
- return CLS_ISCLASS(_class);
-}
-
-static inline BOOL
-class_is_meta_class(Class _class)
-{
- return CLS_ISMETA(_class);
-}
-
-
-static inline void
-class_set_version(Class _class, long version)
-{
- if (CLS_ISCLASS(_class))
- _class->version = version;
-}
-
-static inline void *
-class_get_gc_object_type (Class _class)
-{
- return CLS_ISCLASS(_class) ? _class->gc_object_type : NULL;
-}
-
-/* Mark the instance variable as innaccessible to the garbage collector */
-extern void class_ivar_set_gcinvisible (Class _class,
- const char* ivarname,
- BOOL gcInvisible);
-
-objc_EXPORT IMP method_get_imp(Method_t method);
-
-objc_EXPORT IMP get_imp (Class _class, SEL sel);
-
-/* object_copy used to take a single argument in the traditional GNU
- Objective-C Runtime API (the one declared here), but takes 2 in the
- modern API (implemented in the actual runtime). Define the old
- object_copy in terms of the new one. */
-objc_EXPORT id object_copy (id object, size_t size);
-#define object_copy(X) (object_copy ((X), 0))
-
-objc_EXPORT id object_dispose(id object);
-
-static inline Class
-object_get_class(id object)
-{
- return ((object!=nil)
- ? (CLS_ISCLASS(object->class_pointer)
- ? object->class_pointer
- : (CLS_ISMETA(object->class_pointer)
- ? (Class)object
- : Nil))
- : Nil);
-}
-
-static inline const char *
-object_get_class_name(id object)
-{
- return ((object!=nil)?(CLS_ISCLASS(object->class_pointer)
- ?object->class_pointer->name
- :((Class)object)->name)
- :"Nil");
-}
-
-static inline MetaClass
-object_get_meta_class(id object)
-{
- return ((object!=nil)?(CLS_ISCLASS(object->class_pointer)
- ?object->class_pointer->class_pointer
- :(CLS_ISMETA(object->class_pointer)
- ?object->class_pointer
- :Nil))
- :Nil);
-}
-
-static inline Class
-object_get_super_class
-(id object)
-{
- return ((object!=nil)?(CLS_ISCLASS(object->class_pointer)
- ?object->class_pointer->super_class
- :(CLS_ISMETA(object->class_pointer)
- ?((Class)object)->super_class
- :Nil))
- :Nil);
-}
-
-static inline BOOL
-object_is_class (id object)
-{
- return ((object != nil) && CLS_ISMETA (object->class_pointer));
-}
-
-static inline BOOL
-object_is_instance (id object)
-{
- return ((object != nil) && CLS_ISCLASS (object->class_pointer));
-}
-
-static inline BOOL
-object_is_meta_class (id object)
-{
- return ((object != nil)
- && !object_is_instance (object)
- && !object_is_class (object));
-}
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* not __objc_api_INCLUDE_GNU */
-
-
-
diff --git a/libobjc/objc/objc.h b/libobjc/objc/objc.h
index 8719269bb35..c0d58e1cd11 100644
--- a/libobjc/objc/objc.h
+++ b/libobjc/objc/objc.h
@@ -36,11 +36,6 @@ extern "C" {
#include <stddef.h>
-/* objc-decls.h is included because deprecated/objc_msg_sendv.h needs
- it. When that goes away, the include of objc-decls.h should be
- removed. */
-#include "objc-decls.h"
-
/* The current version of the GNU Objective-C Runtime library in
compressed ISO date format. This should be updated any time a new
version is released with changes to the public API (there is no
@@ -76,15 +71,12 @@ typedef unsigned char BOOL;
selector and know that the class implements it, you can use it to
call the method for an object in the class. */
typedef const struct objc_selector *SEL;
-#include "deprecated/struct_objc_selector.h"
/* A Class is a class (in the object-oriented sense). In Objective-C
there is the complication that each Class is an object itself, and
so belongs to a class too. This class that a class belongs to is
called its 'meta class'. */
typedef struct objc_class *Class;
-#include "deprecated/MetaClass.h"
-#include "deprecated/struct_objc_class.h"
/* An 'id' is an object of an unknown class. The way the object data
is stored inside the object is private and what you see here is
@@ -140,18 +132,11 @@ typedef id (*IMP)(id, SEL, ...);
there is no reason to even define a 'struct objc_protocol'. As
all the structure details will be hidden, a Protocol basically is
simply an object (as it should be). */
- /* typedef struct objc_object Protocol; */
- #include "deprecated/struct_objc_protocol.h"
+ typedef struct objc_object Protocol;
#else /* __OBJC__ */
@class Protocol;
#endif
-/* Deprecated include - here temporarily, for backwards-compatibility
- as reval_t, apply_t, arglist_t and objc_msg_lookup() used to be
- defined here. objc_msg_lookup() is now defined in message.h,
- included by objc-api.h or runtime.h. */
-#include "deprecated/objc_msg_sendv.h"
-
/* Compatibility note: the Apple/NeXT runtime defines sel_getName(),
sel_registerName(), object_getClassName(), object_getIndexedIvars()
in this file while the GNU runtime defines them in runtime.h.
diff --git a/libobjc/objc/runtime.h b/libobjc/objc/runtime.h
index 6e1f1ec36e8..ab9926e9b6d 100644
--- a/libobjc/objc/runtime.h
+++ b/libobjc/objc/runtime.h
@@ -28,23 +28,13 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
/*
This file declares the "modern" GNU Objective-C Runtime API.
- Include this file to use it.
-
- This API is replacing the "traditional" GNU Objective-C Runtime API
- (declared in objc/objc-api.h) which is the one supported by older
- versions of the GNU Objective-C Runtime. The "modern" API is very
- similar to the API used by the modern Apple/NeXT runtime.
-
- Because the two APIs have some conflicting definitions (in
- particular, Method and Category are defined differently) you should
- include either objc/objc-api.h (to use the traditional GNU
- Objective-C Runtime API) or objc/runtime.h (to use the modern GNU
- Objective-C Runtime API), but not both.
-*/
-#ifdef __objc_api_INCLUDE_GNU
-# error You can not include both objc/objc-api.h and objc/runtime.h. Include objc/objc-api.h for the traditional GNU Objective-C Runtime API and objc/runtime.h for the modern one.
-#endif
+ This API replaced the "traditional" GNU Objective-C Runtime API
+ (which used to be declared in objc/objc-api.h) which is the one
+ supported by older versions of the GNU Objective-C Runtime. The
+ "modern" API is very similar to the API used by the modern
+ Apple/NeXT runtime.
+*/
#include "objc.h"
#include "objc-decls.h"