In libobjc/:
2011-05-24 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/48177
* selector.c (__sel_register_typed_name): Use sel_types_match()
instead of strcmp() to compare selector types (Suggestion by
Richard Frith-Macdonald <rfm@gnu.org>).
In gcc/testsuite/:
2011-05-24 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/48177
* objc.dg/pr48177.m: New testcase.
From-SVN: r174143
In libobjc/:
2011-02-28 Nicola Pero <nicola.pero@meta-innovation.com>
* selector.c (sel_getTypedSelector): Return NULL if there are
multiple selectors with conflicting types.
* objc/runtime.h (sel_getTypedSelector): Updated documentation.
In gcc/testsuite/:
2011-02-28 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/gnu-api-2-sel.m: Test that sel_getTypedSelector return
NULL in case of a selector with conflicting types.
* obj-c++.dg/gnu-api-2-sel.mm: Same change.
From-SVN: r170563
In libobjc/:
2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* selector.c (sel_getTypedSelector): Return NULL if given a NULL
argument.
(sel_registerTypedName): Same.
(sel_registerName): Same.
* objc/runtime.h: Updated documentation.
In gcc/testsuite/:
2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/gnu-api-2-sel.m: Test calling sel_getUid,
sel_registerName and sel_registerTypedName with NULL arguments.
Updated the test to work with the Apple runtime as well.
* obj-c++.dg/gnu-api-2-sel.mm: Same change.
From-SVN: r168231
In libobjc/:
2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/runtime.h (sel_getType): Renamed to sel_getTypeEncoding to
be consistent with method_getTypeEncoding and
ivar_getTypeEncoding.
(sel_copyTypedSelectorList, sel_getTypedSelector): New.
* selector.c (sel_getType): Renamed to sel_getTypeEncoding.
(sel_copyTypedSelectorList, sel_getTypedSelector): New.
(sel_get_type): Updated call to sel_getType.
In gcc/testsuite/:
2010-12-24 Nicola Pero <nicola.pero@meta-innovation.com>
* objc.dg/gnu-api-2-sel.m: Updated for renaming of sel_getType to
sel_getTypeEncoding. Test that sel_getTypeEncoding returns NULL
when called with a NULL argument. Added test for
sel_copyTypedSelectorList and sel_getTypedSelector.
* obj-c++.dg/gnu-api-2-sel.mm: Same changes.
From-SVN: r168229
In libobjc/:
2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/45953
* selector.c (__sel_register_typed_name): When registering a new
selector with the same name as an existing one, reuse the existing
name string. Also updated types, casts and comments in the whole
function.
In gcc/testsuite/:
2010-12-21 Nicola Pero <nicola.pero@meta-innovation.com>
PR libobjc/45953
* objc.dg/libobjc-selector-1.m: New test.
From-SVN: r168115
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
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-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.
From-SVN: r167818
2010-12-14 Nicola Pero <nicola.pero@meta-innovation.com>
* selector.c: Reindented some code and tidied up comments. No
actual code changes.
From-SVN: r167815
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-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-11 Nicola Pero <nicola.pero@meta-innovation.com>
* objc/objc.h: Updated comments.
* objc/objc-api.h: (object_copy): Added one argument; use a
#define to maintain backwards-compatibility. Moved
_objc_object_alloc, _objc_object_copy, _objc_object_dispose and
objc_get_uninstalled_dtable into
objc/deprecated/objc_get_uninstalled_dtable.h and
objc/deprecated/objc_object_alloc.h. Include these files.
* objc/deprecated/objc_get_uninstalled_dtable.h: New.
* objc/deprecated/objc_object_alloc.h: New.
* objc/runtime.h (set_getName): New.
(sel_getType): New.
(sel_getUid): New.
(sel_registerName): New.
(sel_registerTypedName): New.
(sel_isEqual): New.
(class_createInstance): New.
(object_copy): New.
(object_dispose): New.
* objects.c: Do not include tconfig.h. Include gc_typed.h if
building the garbage collection version.
(__objc_object_alloc): Removed.
(__objc_object_copy): Removed.
(__objc_object_dispose): Removed.
(class_createInstance): New from code in class_create_instance.
Cast second argument of GC_malloc_explicitly_typed. Use
objc_calloc. Do not call _objc_object_alloc.
(class_create_instance): Call class_createInstance.
(object_copy): Added extraBytes argument. Do not call
_objc_object_copy.
(object_dispose): Do not call _objc_object_dispose.
* memory.c (objc_free): When using garbage collection, mark the
argument as unused.
* selector.c (sel_getName): New.
(sel_get_name): Call sel_getName.
(sel_getType): New.
(sel_get_type): Call sel_getType.
(sel_registerName): New.
(sel_register_name): Call sel_registerName.
(sel_registerTypedName): New.
(sel_register_typed_name): Call sel_registerTypedName.
(sel_getUid): New.
(sel_get_uid): Call sel_getUid.
From-SVN: r165264
* hash.c: Include objc-private/hash.h instead of objc/hash.h.
* objc/sarray.h: Moved into objc/deprecated/sarray.h;
objc/sarray.h replaced with a placeholder including the file from
the deprecated/ directory.
* objc-private/sarray.h: New file (private copy of sarray.h).
* hash.c: Include <assert.h> instead of "assert.h"
* sarray.c: Include <assert.h> instead of "assert.h". Include
objc-private/sarray.h instead of objc/sarray.h.
* selector.c: Include objc-private/sarray.h instead of
objc/sarray.h.
* sendmsg.c: Include <assert.h>. Include objc-private/sarray.h
instead of objc/sarray.h.
* Makefile.in (OBJC_DEPRECATED_H): Added sarray.h.
From-SVN: r164389
* 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
* 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
* 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
2004-05-25 Andrew Pinski <pinskia@physics.uc.edu>
Merge from the libobjc-branch
2004-02-09 Andrew Pinski <pinskia@physics.uc.edu>
* Makefile.in (OBJC_H): Change objc-deps.h to objc-decls.h.
2004-02-03 Andrew Pinski <pinskia@physics.uc.edu>
* Makefile.in (OBJC_H): Add objc-deps.h.
2004-01-27 Nicola Pero <n.pero@mi.flashnet.it>
* Protocol.m ([-conformsTo:]): If the argument is nil, return NO.
([-hash], [-isEqual:]): New methods.
2004-01-27 Richard Frith-Macdonald <rfm@gnu.org>
* sarray.c (sarray_free): Add a better comment.
2004-01-27 Adam Fedor <fedor@gnu.org>
* hash.c (hash_add): Cast cachep to int.
* selector.c (__sel_register_typed_name): Cast
soffset_decode to int.
2004-01-27 Alexander Malmberg <alexander@malmberg.org>
* selector.c: Rename register_selectors_from_list to
__objc_register_selectors_from_list. Update caller.
(__objc_register_selectors_from_list): Lock __objc_runtime_mutex
while registering selectors. Use __sel_register_typed_name instead
of sel_register_typed_name. Check for NULL method_name:s.
(pool_alloc_selector): New function.
(__sel_register_typed_name): Use pool_alloc_selector to allocate
selector structures.
* sendmsg.c (class_add_method_list): Use
__objc_register_selectors_from_list.
* objc/runtime.h: Add __objc_register_selectors_from_list.
2004-01-25 Adam Fedor <fedor@gnu.org>
Nicola Pero <n.pero@mi.flashnet.it>
Andrew Pinski <pinskia@physics.uc.edu>
* objc/objc-decls.h: New file.
* objc/objc-api.h (_objc_lookup_class): Mark as export.
(_objc_load_callback): Likewise.
(_objc_object_alloc): Likewise.
(_objc_object_copy): Likewise.
(_objc_object_dispose): Likewise.
2004-01-25 Andrew Pinski <pinskia@physics.uc.edu>
* archive.c: s/__inline__/inline
* sendmsg.c: Likewise.
* encoding.c: Remove FIXME about the warning
about unused variable.
* sendmsg.c: Add a FIXME comment saying that
this should be using libffi.
* Makefile.in (LIBTOOL): Use @LIBTOOL@ now as it works.
From-SVN: r82253
* Makefile.in: Rewrite.
* configure.in: Likewise.
* configure: Regenerate.
* All .c files. Remove "objc" prefix when including objc header
files. Include tconfig.h, not ../tconfig.h.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r22659