Commit Graph

5 Commits

Author SHA1 Message Date
Nicola Pero bc18535a3e objc.h: Updated comments.
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
2010-10-10 23:28:12 +00:00
Nicola Pero 7e26828068 In libobjc/:
* Makefile.in (%_gc.lo): New pattern rules to build the
        garbage-collected version of the library.  Removed rules for
        specific files that are no longer needed.  Standardized all rules.
        (C_SOURCE_FILES, OBJC_SOURCE_FILES): New variables.
        (OBJS, OBJS_GC): Compute these from C_SOURCE_FILES and
        OBJC_SOURCE_FILES.
        (INCLUDES): Removed the unused include -I$(srcdir)/objc.

        * memory.c (objc_calloc): Fixed call to GC_malloc when building
        with Garbage Colletion.

From-SVN: r164231
2010-09-12 14:55:21 +00:00
Nicola Pero 457e68e7b2 In libobjc/:
* memory.c: Do not include objc-private/runtime.h.

From-SVN: r164225
2010-09-12 01:51:18 +00:00
Nicola Pero d1be5d82e0 In libobjc/:
* objc/deprecated/objc_malloc.h: New file.
        * objc/deprecated/objc_valloc.h: New file.
        * objc/objc-api.h: Include the files instead of defining
        objc_valloc, _objc_malloc() and similar.
        * Makefile.in (OBJC_DEPRECATED_H): Added objc_valloc.h and
        objc_malloc.h.
        * memory.c: Removed the extra layer of indirection of _objc_malloc
        and similar.
        (objc_calloc): Use GC_malloc in the garbage-collected
        implementation as GC_malloc returns memory that is already freed.
        (objc_valloc): Deprecated.

From-SVN: r164224
2010-09-12 01:44:58 +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