Commit Graph

45 Commits

Author SHA1 Message Date
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Richard Sandiford f82356d214 Update copyright years in libobjc/
From-SVN: r206299
2014-01-02 22:26:09 +00:00
Ondřej Bílka cad10e055f class.c: Fix typos.
2013-07-21   Ondřej Bílka  <neleai@seznam.cz>

	* class.c: Fix typos.
	* encoding.c: Likewise.
	* init.c: Likewise.
	* objc-private/runtime.h: Likewise.
	* objc/runtime.h: Likewise.
	* objc-sync.c: Likewise.

From-SVN: r201097
2013-07-21 15:38:21 +00:00
Richard Sandiford ad2466aee4 Update copyright years in libobjc.
From-SVN: r195693
2013-02-03 11:16:21 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Nicola Pero b4a50e4336 In libobjc/: 2011-10-09 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2011-10-09  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR libobjc/49883
	* init.c (__objc_exec_class): Work around a bug in clang's code
	generation.  Clang sets the class->info field to values different
	from 0x1 or 0x2 (the only allowed values in the traditional GNU
	Objective-C runtime ABI) to store some additional information, but
	this breaks backwards compatibility.  Wipe out all the bits in the
	fields other than the first two upon loading a class.

2011-10-09  Nicola Pero  <nicola.pero@meta-innovation.com>
	
	* class.c (objc_lookup_class): Added back for compatibility with
	clang which seems to emit calls to it.

From-SVN: r179721
2011-10-09 10:29:50 +00:00
Nicola Pero fa539f5189 In libobjc/: 2010-12-26 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c (create_tree_of_subclasses_inherited_from): Use
	class_superclass_of_class instead of assuming a class is
	unresolved when it could be resolved.  Tidied up code.
	(__objc_tree_insert_class): Enhanced DEBUG_PRINTF.
	(objc_tree_insert_class): Tidied up loop; return immediately upon
	inserting a class.
	(__objc_exec_class): Do not set __objc_class_tree_list.
	
In gcc/testsuite/:
2010-12-26  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc.dg/special/special.exp: Added load-category-2 and
	load-category-3 tests.
	* objc.dg/special/load-category-2.h: New.
	* objc.dg/special/load-category-2.m: New.
	* objc.dg/special/load-category-2a.m: New.
	* objc.dg/special/load-category-3.h: New.
	* objc.dg/special/load-category-3.m: New.
	* objc.dg/special/load-category-3a.m: New.

From-SVN: r168251
2010-12-26 16:56:01 +00:00
Nicola Pero e99776d82a In libobjc/: 2010-12-23 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-23  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c (create_tree_of_subclasses_inherited_from): Updated
	DEBUG_PRINTF messages.
	(__objc_tree_insert_class): Same.
	(__objc_send_load_using_method_list): Same.
	(__objc_send_load): Same.
	(__objc_exec_class): Same.  In particular, do not print the module
	name since it is no longer used.
	* sendmsg.c (__objc_send_initialize): Added DEBUG_PRINTFs for
	tracking +initialize calls.
	(__objc_update_dispatch_table_for_class): Added DEBUG_PRINTFs for
	tracking updates of dispatch tables.
	(__objc_install_dispatch_table_for_class): Same.

From-SVN: r168215
2010-12-23 19:46:04 +00:00
Nicola Pero 0bfe3fa10f In libobjc/: 2010-12-22 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-22  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c (duplicate_classes): New.
	(__objc_exec_class): Initialize duplicate_classes.
	(__objc_create_classes_tree): Ignore classes in the
	duplicate_classes table.
	(__objc_call_load_callback): Same.
	(__objc_init_class): If a duplicate class is found, add it to
	duplicate_classes instead of aborting.  Return YES if the class is
	not a duplicate, and NO if it is.
	* objc-private/runtime.h (__objc_init_class): Updated prototype.

From-SVN: r168183
2010-12-22 23:05:13 +00:00
Nicola Pero 1575c9deae In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR libobjc/18764
	* class.c (__objc_add_class_to_hash): Return YES if the class was
	added, and NO if it already existed.
	* init.c (__objc_init_class): If __objc_add_class_to_hash returns
	NO, then abort the program with an error message.
	* objc-private/runtime.h (__objc_add_class_to_hash): Updated
	declaration.

From-SVN: r168139
2010-12-21 22:49:37 +00:00
Nicola Pero 1588200e46 In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c (_objc_load_callback): Initialize with 0.
	(__objc_call_callback): Renamed to __objc_call_load_callback.
	Check _objc_load_callback only once, and if it is not set, return
	immediately.
	(objc_send_load): Updated call to __objc_call_callback.

From-SVN: r168133
2010-12-21 22:17:52 +00:00
Nicola Pero c07499dc75 In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR libobjc/16110
	* init.c (__objc_send_message_in_list): Renamed to
	__objc_send_load_using_method_list.  Do not take an 'op' argument.
	Register the 'load' selector if needed.
	(__objc_send_load): Do not register the 'load' selector.  Updated
	call to __objc_send_message_in_list.
	(__objc_create_classes_tree): Add the class of any claimed
	category that was loaded in the module to the list of classes for
	which we try to execute +load.
	
In gcc/testsuite/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	PR libobjc/16110
	* objc.dg/special/special.exp: Added new test.
	* objc.dg/special/load-category-1.m: New.
	* objc.dg/special/load-category-1a.m: New.
	* objc.dg/special/load-category-1.h: New.

From-SVN: r168122
2010-12-21 15:34:19 +00:00
Nicola Pero df0820da97 In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-private/common.h: When DEBUG is defined, include <stdio.h>.
	Updated comments.
	* init.c (__objc_tree_insert_class): Use %p, not %x, when printing
	a pointer using DEBUG_PRINTF.

From-SVN: r168119
2010-12-21 14:56:18 +00:00
Nicola Pero 600cbba24e In libobjc/: 2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-21  Nicola Pero  <nicola.pero@meta-innovation.com>

	* objc-private/module-abi-8.h (struct objc_symtab): Declare 'refs'
	to be 'struct objc_selector *' and not 'SEL'.
	* init.c (__objc_exec_class): Call
	__objc_register_selectors_from_module instead of iterating over
	each selector and calling __sel_register_typed_name for each.
	* objc-private/selector.h: Declare
	__objc_register_selectors_from_module instead of
	__sel_register_typed_name.
	* selector.c (__objc_register_selectors_from_module): New.
	(__sel_register_typed_name): Made static.

From-SVN: r168113
2010-12-21 12:49:26 +00:00
Nicola Pero 41720477ab In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c (__objc_exec_class): Call __objc_resolve_class_links (),
	if appropriate, after loading the module.

From-SVN: r168065
2010-12-19 17:30:30 +00:00
Nicola Pero 120d5f8ea4 In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c: Updated comments.
	* objc/objc-api.h: Updated comments.
	* objc/runtime.h (_objc_load_callback): Declare.

From-SVN: r168044
2010-12-19 02:12:42 +00:00
Nicola Pero 1af5b8f553 In libobjc/: 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-19  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c: Include objc-private/selector.h.  Do not declare
	__sel_register_typed_name.
	* objc-private/selector.h (__sel_register_typed_name): Declare.
	* selector.c: Include objc-private/selector.h.

From-SVN: r168039
2010-12-19 00:28:52 +00:00
Nicola Pero 575584a982 In libobjc/: 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-12-18  Nicola Pero  <nicola.pero@meta-innovation.com>

	* class.c: Tidied up comments and indentation.  No code changes.
	* error.c: Same.
	* exception.c: Same.
	* init.c: Same.
	* ivars.c: Same.
	* memory.c: Same.
	* objc-foreach.c: Same.
	* objc-sync.c: Same.
	* objects.c: Same.
	* protocols.c: Same.
	* sarray.c: Same.
	* thr.c: Same.

From-SVN: r168022
2010-12-18 12:22:59 +00:00
Nicola Pero fed2b10179 init.c: Include objc/runtime.h and objc-private/module-abi-8.h instead of objc/objc-api.h.
2010-12-17  Nicola Pero  <nicola.pero@meta-innovation.com>

	* init.c: Include objc/runtime.h and objc-private/module-abi-8.h
	instead of objc/objc-api.h.
	(init_check_module_version): Take a 'struct objc_module *'
	argument instead of 'Module_t'.  Use 'struct objc_module *'
	instead of 'Module_t'.
	(__objc_created_classes_tree): Take a 'struct objc_module *'
	argument instead of 'Module_t'; use 'struct objc_symtab *' instead
	of 'Symtab_t'.
	(__objc_call_callback): Take a 'struct objc_module *' argument
	instead of 'Module_t'; use 'struct objc_symtab *' instead of
	'Symtab_t' and 'struct objc_category *' instead of 'Category_t'.
	(_objc_load_callback): Take a 'struct objc_category *' argument
	instead of 'Category *'.
	(class_superclass_of_class): Use objc_getClass() instead of
	objc_lookup_class().
	(create_tree_of_subclasses_inherited_from): Same change (also, use
	an explicit 'if' instead of '?').
	(objc_init_statics): Same change.
	(objc_send_load): Same change.
	(__objc_init_protocol): same change.
	(__objc_send_message_in_list): Take a 'struct objc_method_list *'
	argument instead of 'MethodList_t'.  Use 'struct objc_method *'
	instead of 'Method_t'.
	(__objc_send_load): Use 'struct objc_method_list *' instead of
	'MethodList_t'.  Use sel_registerName() instead of
	sel_register_name().
	(__objc_exec_class): Take a 'struct objc_module *' argument
	instead of 'Module_t'.  Use 'struct objc_symtab *' instead of
	'Symtab_t'.  Use objc_getClass() instead of objc_lookup_class().
	Use 'struct objc_category *' instead of 'Category_t'.

From-SVN: r168000
2010-12-17 22:12:34 +00:00
Nicola Pero 682e805aaf Makefile.in (OBJC_SOURCE_FILES): Added accessors.m.
2010-10-24  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (OBJC_SOURCE_FILES): Added accessors.m.
        * accessors.m: New.
        * init.c: Include objc-private/accessors.h.
        (__objc_exec_class): Call __objc_accessors_init.
        * objc-private/accessors.h: New.

From-SVN: r165903
2010-10-24 17:23:19 +00:00
Nicola Pero 1501d0941a In libobjc/: 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        * init.c (objc_send_load): Do not wait for NXConstantString to be
        registered before executing +load.  There is no point if
        -fconstant-string-class=xxx is used when compiling all modules,
        as is the case for almost all users.
        * linking.m (__objc_linking): Do not try to forcefully link in
        NXConstantString.

In gcc/:
2010-10-17  Nicola Pero  <nicola.pero@meta-innovation.com>

        * doc/objc.texi (What you can and what you cannot do in +load):
        Document that sending messages to constant string objects in +load
        is not guaranteed to work.

From-SVN: r165583
2010-10-17 11:01:31 +00:00
Nicola Pero 6c5c7efd6b In libobjc/: 2010-10-16 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-16  Nicola Pero  <nicola.pero@meta-innovation.com>

        * objc/runtime.h: Updated comments.
        (class_addMethod): New.
        (class_addIvar): New.
        (class_replaceMethod): New.
        (objc_allocateClassPair): New.
        (objc_registerClassPair): New.
        (objc_disposeClassPair): New.
        * class.c (objc_allocateClassPair): New.
        (objc_registerClassPair): New.
        (objc_disposeClassPair): New.
        (class_getSuperclass): Return Nil if a class is in construction.
        * init.c (__objc_exec_class): Call __objc_init_class.
        (__objc_init_class): New.
        * ivars.c (class_copyIvarList): Return NULL if class is in
        construction.  Do not lock the runtime mutex.
        (class_getInstanceVariable): Return NULL if class is in
        construction.  Do not lock the runtime mutex.
        (class_addIvar): New.
        * sendmsg.c (class_addMethod): New.
        (class_replaceMethod): New.
        * objc-private/module-abi-8.h (__CLS_SETNOTINFO): New.
        (_CLS_IN_CONSTRUCTION): New.
        (CLS_IS_IN_CONSTRUCTION): New.
        (CLS_SET_IN_CONSTRUCTION): New.
        (CLS_SET_NOT_IN_CONSTRUCTION): New.
        * objc-private/runtime.h (__objc_init_class): New.

From-SVN: r165563
2010-10-16 21:26:59 +00:00
Nicola Pero f7185d4791 In libobjc/: 2010-10-14 Nicola Pero <nicola.pero@meta-innovation.com>
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.

From-SVN: r165499
2010-10-15 10:35:00 +00:00
Nicola Pero 5254c66ba0 In libobjc/: 2010-10-13 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR libobjc/23214
        * init.c (objc_init_statics): Do not skip the initialization of a
        statics list if the first object has already been initialized; in
        the case of Protocols, while the first one may have been
        initialized, some others may not have been initialized yet.

In gcc/testsuite/:
2010-10-13  Nicola Pero  <nicola.pero@meta-innovation.com>

        PR libobjc/23214
        * objc.dg/pr23214.m: New.

From-SVN: r165414
2010-10-13 08:16:42 +00:00
Nicola Pero 718a8e53dc archive.c: Do not include objc/objc.h.
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * archive.c: Do not include objc/objc.h.
        * class.c: Do not include objc/objc.h.
        * encoding.c: Include objc/runtime.h, ctype.h and
        objc-private/module-abi-8.h instead of objc/objc-api.h and
        objc/encoding.h.
        * error.c: Do not include objc/objc.h.
        * gc.c: Include tconfig.h and objc/encoding.h only if
        OBJC_WITH_GC.
        * hash.c: Include objc/runtime.h and objc/thr.h instead of
        objc/objc-api.h.  Do not include objc/objc.h.
        * init.c: Do not include objc/objc.h.
        * ivars.c: Include objc/runtime.h, objc-private/module-abi-8.h and
        objc/thr.h instead of objc/objc-api.h.  Do not include
        objc/objc.h.
        * linking.m: Tidied comment.
        * memory.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objects.c: Do not include objc/objc.h.
        * objc-sync.c: Include objc/runtime.h instead of objc/objc-api.h.
        * protocols.c: Do not include objc/objc.h.
        * sarray.c: Include objc/runtime.h instead of objc/objc-api.h.  Do
        not include objc/objc.h.
        * selector.c: Do not include objc/objc.h.
        * sendmsg.c: Do not include objc/objc.h.
        * thr.c: Include objc/runtime.h instead of objc/objc-api.h.
        Do not include objc/objc.h.
        * objc/objc-decls.h: Reindented code.
        * objc/runtime.h Include objc-decls.h.  Updated comments.
        (objc_malloc): New.
        (objc_atomic_malloc): New.
        (objc_calloc): New.
        (objc_realloc): New.
        (objc_free): New.
        * objc-private/runtime.h: Updated comments.

From-SVN: r165386
2010-10-12 16:17:18 +00:00
Nicola Pero debfbfeefc In libobjc/: 2010-10-12 Nicola Pero <nicola.pero@meta-innovation.com>
In libobjc/:
2010-10-12  Nicola Pero  <nicola.pero@meta-innovation.com>

        * Makefile.in (C_SOURCE_FILES): Added protocols.c.
        * objc-private/protocols.h: New.
        * protocols.c: New.
        * init.c: Include objc-private/protocols.h.
        (__objc_exec_class): Call __objc_protocols_init on startup.
        (__objc_init_protocols): Call __objc_protocols_add_protocol.
        * objc-private/runtime.h: Use (struct objc_method_list *) instead
        of MethodList_t, and (struct objc_method *) instead of Method_t.
        * objc/deprecated/struct_objc_class.h: Define
        __objc_STRUCT_OBJC_CLASS_defined.
        * objc-private/module-abi-8.h (struct
        objc_method_description_list): New.
        (struct objc_class): Only define if
        __objc_STRUCT_OBJC_CLASS_defined is undefined.
        * objc/runtime.h (class_getName): New.
        (objc_getProtocol): New.
        (objc_copyProtocolList): New.
        (class_addProtocol): New.
        (class_conformsToProtocol): New.
        (class_copyProtocolList): New.
        (protocol_conformsToProtocol): New.
        (protocol_isEqual): New.
        (protocol_getName): New.
        (protocol_getMethodDescription): New.
        (protocol_copyMethodDescriptionList): New.
        (protocol_getProperty): New.
        (protocol_copyPropertyList): New.
        (protocol_copyProtocolList): New.
        * class.c (class_getName): New.
        * selector.c (sel_isEqual): New.

From-SVN: r165349
2010-10-12 02:43:25 +00:00
Nicola Pero 5be9cdc112 In libobjc/:
* objc/hash.h: Moved into objc/deprecated/hash.h; objc/hash.h
        replaced with a placeholder including the file from the
        deprecated/ directory.
        * objc/objc-api.h: Updated includes.
        * objc/typedstream.h: Updated includes.
        * objc-private/hash.h: New file (private copy of hash.h).
        * objc/objc-list.h: Moved into objc/deprecated/objc-list.h;
        objc/objc-list.h replaced with a placeholder including the file
        from the deprecated/ directory.
        * objc-private/objc-list.h: New file (private copy of objc-list.h).
        * init.c: Include objc-private/hash.h and objc-private/objc-list.h
        instead of objc/hash.h and objc/objc-list.h.
        * selector.c: Same change.
        * class.c: Added include <string.h>, which used to be implicitly included
        when hash.h was included.
        * exception.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * sendmsg.c: Same change.
        * Makefile.in (OBJC_DEPRECATED_H): Added hash.h and objc-list.h.
        (OBJC_H): Removed hash.h and objc-list.h

From-SVN: r164373
2010-09-17 16:35:15 +00:00
Nicola Pero fd3125375f In libobjc/: Implemented objc_sync_enter() and objc_sync_exit(), which are required by @synchronized() to work.
In libobjc/:
       Implemented objc_sync_enter() and objc_sync_exit(), which are
       required by @synchronized() to work.
       * objc-sync.c: New file.
       * objc/objc-sync.h: New file.
       * objc-private/objc-sync.h: New file.
       * init.c (__objc_exec_class): Call __objc_sync_init() during the
       Objective-C runtime startup.
       * Makefile.in: Added objc-sync.c and objc-sync.h.
       * configure.ac: Added GCC_CHECK_TLS.
       * acinclude.m4: Include ../config/enable.m4 and ../config/tls.m4.
       * configure: Regenerated.
       * config.h.in: Regenerated.

From-SVN: r164276
2010-09-14 10:23:37 +00:00
Nicola Pero 7b86998664 In libobjc/:
* objc/deprecated/objc_error.h: New file.
        * objc/objc-api.h: Include deprecated/objc_error.h instead of
        defining objc_error and related.
        * error.c: New file.  Added _objc_abort function which replaces
        objc_error.  No change in functionality as they both print an
        error and abort.
        * misc.c: File removed.  Code moved into memory.c and error.c.
        * memory.c: New file.
        * objc-private/error.h: New file.
        * archive.c: Include objc-private/error.h and use _objc_abort
        instead of objc_error everywhere.
        * class.c: Same change.
        * encoding.c: Same change.
        * init.c: Same change, and simplified init_check_module_version.
        * memory.c: Same change.
        * sendmsg.c:  Same change.
        * thr.c: Same change.
        * Makefile.in (OBJ_DEPRECATED_H): Added objc_error.h.
        (OBJ_H): Reordered list.
        (OBJS): Removed misc.lo, added memory.lo and error.lo.
        (OBJS_GC): Removed misc_gc.lo, added memory_gc.lo and error_gc.lo.
        (misc_gc.lo): Rule removed.
        (error_gc.lo): Rule added.
        (memory_gc.lo): Rule added.

From-SVN: r164223
2010-09-12 00:43:15 +00:00
Nicola Pero 6dead247c9 In libobjc/:
* objc/objc.h (__GNU_LIBOBJC__): New #define providing an easy way
        to check the API version.  Added some comments.

        * objc-private/common.h: New file.
        * NXConstStr.m: Include objc-private/common.h.
        * Object.m: Same change.
        * Protocol.m: Same change.
        * archive.c: Same change.
        * class.c: Same change.
        * encoding.c: Same change.
        * exception.c: Same change.
        * gc.c: Same change.
        * hash.c: Same change.
        * init.c: Same change.
        * libobjc_entry.c: Same change.
        * linking.m: Same change.
        * misc.c: Same change (and added a comment).
        * nil_method.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * selector.c: Same change.
        * sendmsg.c: Same change.
        * thr.c: Same change.

From-SVN: r164218
2010-09-11 22:47:14 +00:00
Nicola Pero a19fac96a2 In libobjc/:
* objc/runtime.h: Moved to objc-private/runtime.h.  Do not include
        all the objc/*.h files.
        * objc-private/runtime.h: New file.
        * archive.c: Include objc-private/runtime.h (and required objc/*.h
        files) instead of objc/runtime.h.
        * class.c: Same change.
        * hash.c: Same change.
        * init.c: Same change.
        * misc.c: Same change.
        * nil_method.c: Same change.
        * objects.c: Same change.
        * sarray.c: Same change.
        * selector.c: Same change.
        * sendmsg.c: Same change.
        * thr.c: Same change.

From-SVN: r164213
2010-09-11 12:58:27 +00:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Kelley Cook f9d09c4359 All files: Update FSF address.
2005-08-17  Kelley Cook  <kcook@gcc.gnu.org>

	* All files: Update FSF address.

From-SVN: r103197
2005-08-17 03:21:42 +00:00
David Ayers 348a344520 archive.c, [...]: Include hash.h.
2005-06-07  David Ayers  <d.ayers@inode.at>

	* archive.c, init.c, selector.c: Include hash.h.
	* archive.c, class.c, encoding.c, gc.c, hash.c, hash_compat.c,
	init.c, misc.c, nil_method.c, objects.c, sarray.c, selector.c,
	sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c, thr-mach.c,
	thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c, thr-rtems.c,
	thr-single.c, thr-solaris.c, thr-vxworks.c, thr-win32.c, thr.c:
	Include Objective-C headers with quotes and objc/ directory
	prefix.

From-SVN: r100723
2005-06-07 21:04:19 +00:00
David Ayers 270a1283e6 re PR libobjc/19024 (name collisions libobjc/libmysqlclient)
2005-03-02  David Ayers  <d.ayers@inode.at>

        PR libobjc/19024
        * Makefile.in (OBJS): Add hash_compat.lo.
        (OBJS_GC): Add hash_compat_gc.lo.
        (hash_compat_gc.lo): New target and rule.
        * objc/hash.h (hash_new, hash_delete, hash_add, hash_remove)
        (hash_next, hash_value_for_key, hash_is_key_in_hash)
        (hash_ptr, hash_string, compare_ptrs, compare_strings): Prefix
        with objc_.  Add deprecated non prefixed inlined versions.
        (OBJC_IGNORE_DEPRECATED_API): New macro to hide deprecated
        declarations.
        * hash.c (hash_new, hash_delete, hash_add, hash_remove, hash_next)
        (hash_value_for_key, hash_is_key_in_hash): Prefix with objc_ and
        update callers.
        * hash_compat.c: New file.
        * archive.c: Update callers.
        * init.c: Likewise.
        * selector.c: Likewise.
        * libobjc.def: Add objc_ versions of hash functions.

From-SVN: r95793
2005-03-02 11:37:03 -08:00
Nathanael Nerode 38709cad91 hash.c, [...]: Replace "GNU CC" with "GCC".
* hash.c, init.c, libobjc.def, libobjc_entry.c, linking.m,
	makefile.dos, misc.c, nil_method.c, objects.c, sarray.c,
	selector.c, sendmsg.c, thr-dce.c, thr-decosf1.c, thr-irix.c,
	thr-mach.c, thr-objc.c, thr-os2.c, thr-posix.c, thr-pthreads.c,
	thr-rtems.c, thr-single.c, thr-solaris.c, thr-vxworks.c,
	thr-win32.c, thr.c: Replace "GNU CC" with "GCC".

From-SVN: r67134
2003-05-23 20:25:39 +00:00
Richard Frith-Macdonald e083f3f926 Fixed getting the superclass when building class tree used for +load, would
cause extremely rare crashes

Co-Authored-By: Nicola Pero <n.pero@mi.flashnet.it>

From-SVN: r66822
2003-05-15 09:34:32 +00:00
Rodney Brown 40165636b5 encoding.h: Fix formatting.
2002-07-02  Rodney Brown  <rbrown64@csc.com.au>

	* objc/encoding.h: Fix formatting.
	* objc/hash.h: Likewise.
	* objc/objc-api.h: Likewise.
	* objc/runtime.h: Likewise.
	* objc/thr.h: Likewise.
	* archive.c: Likewise.
	* class.c: Likewise.
	* encoding.c: Likewise.
	* gc.c: Likewise.
	* hash.c: Likewise.
	* init.c: Likewise.
	* misc.c: Likewise.
	* nil_method.c: Likewise.
	* objects.c: Likewise.
	* sarray.c: Likewise.
	* selector.c: Likewise.
	* sendmsg.c: Likewise.
	* thr-mach.c: Likewise.
	* thr.c: Likewise.

From-SVN: r55190
2002-07-02 19:43:03 +00:00
Kaveh R. Ghazi 8f8c44cb4f Object.m: Fix signed/unsigned warning.
* Object.m: Fix signed/unsigned warning.
	* Protocol.m: Likewise.
	* archive.c: Always include stdlib.h.
	(objc_read_short, objc_read_unsigned_short, objc_read_int,
	objc_read_long, __objc_read_nbyte_uint, __objc_read_nbyte_ulong):
	Fix signed/unsigned warning.
	(objc_write_type, objc_read_type, objc_write_types,
	objc_read_types): Ensure ctype 8-bit safety.
	(__objc_no_write, __objc_no_read): Mark unused parameters.
	* class.c (class_table_setup): Specify void arg.
	* encoding.c (atoi, objc_sizeof_type, objc_alignof_type,
	objc_skip_typespec, objc_skip_offset,
	objc_layout_structure_next_member): Ensure ctype 8-bit safety.
	(objc_layout_structure_next_member): Ensure variables are
	initialized.
	* gc.c (__objc_generate_gc_type_description,
	class_ivar_set_gcinvisible): Mark unused parameters.
	* init.c (__objc_send_load, __objc_destroy_class_tree_node): Mark
	unused parameters.
	(__objc_init_protocols) Fix signed/unsigned warning.
	* nil_method.c (nil_method): Mark unused parameters.
	* thr.h (objc_thread_callback): Specify void arg.
	* sarray.c (sarray_new, sarray_realloc, sarray_free): Fix
	signed/unsigned warning.
	(sarray_free): Fix formatting.
	* selector.c (sel_types_match): Ensure ctype 8-bit safety.
	* sendmsg.c (__objc_init_install_dtable) Mark unused parameters.

From-SVN: r54649
2002-06-15 17:50:14 +00:00
Nicola Pero e5e0f6f539 Fixed bug in loading of categories under certain special circumstances
From-SVN: r48110
2001-12-17 17:23:09 +00:00
Richard Frith-Macdonald e6be21fe87 init.c (__objc_send_message_in_list): When setting a new entry in __objc_load_methods use the method IMP as key...
2001-06-06  Richard Frith-Macdonald  <rrfm@gnu.org>

        * init.c (__objc_send_message_in_list): When setting a new entry
        in __objc_load_methods use the method IMP as key, but check to see
        if the method is in the hashtable by looking at the IMP also.
        Also ... call the method after adding it to the hashtable rather
        than before ... thus preventing an obscure possibility of infinite
        recursion if a +load method itself loads a subclass.

From-SVN: r43052
2001-06-08 22:19:47 +00:00
Ovidiu Predescu 3e5252057d (__objc_send_message_in_list): When setting a new entry in __objc_load_methods use the method name as key...
(__objc_send_message_in_list): When setting a new entry in
__objc_load_methods use the method name as key, not the method IMP
(reported by Richard Frith-Macdonald <richard@brainstorm.co.uk>).

From-SVN: r42561
2001-05-25 07:12:17 +00:00
John David Anglin 6000b42b21 init.c (__objc_force_linking): Make global.
�
        * init.c (__objc_force_linking): Make global.

From-SVN: r27638
1999-06-20 22:41:41 -06:00
Ben Elliston 88e17b57eb 1998-09-21 Ben Elliston <bje@cygnus.com>
* New directory.  Moved files from ../gcc/objc.

From-SVN: r22514
1998-09-21 11:22:07 +10:00