summaryrefslogtreecommitdiff
path: root/libobjc/Protocol.m
Commit message (Collapse)AuthorAgeFilesLines
* In libobjc/:nicola2011-06-071-86/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/:nicola2010-12-191-9/+9
| | | | | | | | | | | | | | 2010-12-19 Nicola Pero <nicola.pero@meta-innovation.com> * Protocol.m: Moved all methods, with the exception of -isEqual:, into the 'Deprecated' category. * objc/Protocol.h: Removed all methods, moved to objc/deprecated/Protocol.h. Include objc/deprecated/Protocol.h. * objc/deprecated/Protocol.h: New. * Makefile.in (OBJC_DEPRECATED_H): Added Protocol.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168040 138bc75d-0d04-0410-961f-82ee72b054a4
* In libobjc/:nicola2010-10-151-70/+9
| | | | | | | | | | | | | | | | | | | | | 2010-10-15 Nicola Pero <nicola.pero@meta-innovation.com> * Protocol.m: Include objc/runtime.h and objc-private/module-abi-8.h instead of objc/objc-api.h. Do not repeat Protocol's instance variables. (struct objc_method_description_list): Do not define here. ([-conformsTo:]): Reimplemented on top of protocol_conformsTo(). ([descriptionForInstanceMethod:]): Use sel_isEqual() to compare selectors directly instead of getting names and then using strcmp. ([descriptionForClassMethod:]): Same change. ([-isEqual:]): Reimplemented on top of protocol_isEqual(). * protocols.c (protocol_getMethodDescription): Use sel_isEqual() to compare selectors directly instead of getting names and then using strcmp. * objc/Protocol.h: Updated comments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165517 138bc75d-0d04-0410-961f-82ee72b054a4
* In libobjc/:nicola2010-10-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* In libobjc/:nicola2010-09-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164218 138bc75d-0d04-0410-961f-82ee72b054a4
* Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.jakub2009-04-091-12/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@145841 138bc75d-0d04-0410-961f-82ee72b054a4
* 2005-08-17 Kelley Cook <kcook@gcc.gnu.org>kcook2005-08-171-2/+2
| | | | | | | * All files: Update FSF address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103197 138bc75d-0d04-0410-961f-82ee72b054a4
* Improved [Protocol -isEqual:], now more correct and fasternicola2004-06-041-1/+23
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82619 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-05-25 Andrew Pinski <pinskia@physics.uc.edu>pinskia2004-05-251-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82253 138bc75d-0d04-0410-961f-82ee72b054a4
* PR 11433zack2003-12-011-10/+12
| | | | | | | | | | | | gcc/testsuite: * objc.dg/proto-lossage-3.m: New test. libobjc: * Protocol.m (descriptionForInstanceMethod): Don't dereference instance_methods if it's NULL. (descriptionForClassMethod): Likewise for class_methods. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74137 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>neroden2003-05-231-4/+4
| | | | | | | | | | | * Makefile.in, NXConstStr.m, Object.m, Protocol.m, archive.c, class.c, encoding.c, gc.c, objc/NXConstStr.h, objc/Object.h, objc/Protocol.h, objc/encoding.h, objc/hash.h, objc/objc-api.h, objc/objc-list.h, objc/objc.h, ocjc/runtime.h, objc/sarray.h, objc/thr.h, objc/typedstream.h: Replace "GNU CC" with "GCC". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67131 138bc75d-0d04-0410-961f-82ee72b054a4
* * Object.m: Fix signed/unsigned warning.ghazi2002-06-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54649 138bc75d-0d04-0410-961f-82ee72b054a4
* 1998-09-21 Ben Elliston <bje@cygnus.com>bje1998-09-211-0/+128
* New directory. Moved files from ../gcc/objc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@22514 138bc75d-0d04-0410-961f-82ee72b054a4