1998-09-21 03:22:07 +02:00
|
|
|
/* GNU Objective C Runtime internal declarations
|
2004-05-25 21:10:54 +02:00
|
|
|
Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc.
|
1998-09-21 03:22:07 +02:00
|
|
|
Contributed by Kresten Krab Thorup
|
|
|
|
|
Makefile.in, [...]: Replace "GNU CC" with "GCC".
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* 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".
From-SVN: r67131
2003-05-23 22:04:58 +02:00
|
|
|
This file is part of GCC.
|
1998-09-21 03:22:07 +02:00
|
|
|
|
Makefile.in, [...]: Replace "GNU CC" with "GCC".
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* 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".
From-SVN: r67131
2003-05-23 22:04:58 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify it under the
|
1998-09-21 03:22:07 +02:00
|
|
|
terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; either version 2, or (at your option) any later version.
|
|
|
|
|
Makefile.in, [...]: Replace "GNU CC" with "GCC".
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* 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".
From-SVN: r67131
2003-05-23 22:04:58 +02:00
|
|
|
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
1998-09-21 03:22:07 +02:00
|
|
|
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
Makefile.in, [...]: Replace "GNU CC" with "GCC".
2003-05-23 Nathanael Nerode <neroden@gcc.gnu.org>
* 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".
From-SVN: r67131
2003-05-23 22:04:58 +02:00
|
|
|
GCC; see the file COPYING. If not, write to the Free Software
|
1998-09-21 03:22:07 +02:00
|
|
|
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|
|
|
|
|
|
|
/* As a special exception, if you link this library with files compiled with
|
|
|
|
GCC to produce an executable, this does not cause the resulting executable
|
|
|
|
to be covered by the GNU General Public License. This exception does not
|
|
|
|
however invalidate any other reasons why the executable file might be
|
|
|
|
covered by the GNU General Public License. */
|
|
|
|
|
|
|
|
#ifndef __objc_runtime_INCLUDE_GNU
|
|
|
|
#define __objc_runtime_INCLUDE_GNU
|
|
|
|
|
2004-08-14 00:23:58 +02:00
|
|
|
#include <stdarg.h> /* for varargs and va_list's */
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
#include <stddef.h> /* so noone else will get system versions */
|
|
|
|
#include <assert.h>
|
|
|
|
|
NXConstStr.h: Update copyright date...
2004-08-12 Ziemowit Laski <zlaski@apple.com>
* objc/NXConstStr.h: Update copyright date; bracket with
'extern "C"' for C++ use; make include syntax consistent
by using <...> instead of "..."; hoist <objc/...> includes
above the 'extern "C"' block.
* objc/Object.h: Likewise.
* objc/Protocol.h: Likewise.
* objc/encoding.h: Likewise.
* objc/hash.h: Likewise.
* objc/runtime.h: Likewise.
* objc/sarray.h: Likewise.
* objc/thr.h: Likewise.
* objc/typedstream.h: Likewise.
* objc/objc-api.h: Add 'extern "C"' block for C++ use.
(objc_static_instances): For C++ case, do away with
zero-sized array.
(objc_method): Hoist definition to file scope.
(_objc_load_callback, _objc_object_alloc, class_get_class_method,
class_get_instance_method, class_create_instance,
class_get_class_name, class_get_instance_size,
class_get_meta_class, class_get_super_class, class_get_version,
class_is_class, class_is_meta_class, class_set_version,
class_get_gc_object_type, class_ivar_set_gcinvisible,
get_imp): Rename 'class' parameter to '_class'.
* objc/objc-list.h: Add 'extern "C"' block for C++ use.
* objc/objc.h: Update copyright date.
(arglist_t): Provide a union tag.
From-SVN: r85927
2004-08-13 04:06:37 +02:00
|
|
|
#include <objc/objc.h> /* core data types */
|
|
|
|
#include <objc/objc-api.h> /* runtime api functions */
|
1998-09-21 03:22:07 +02:00
|
|
|
|
NXConstStr.h: Update copyright date...
2004-08-12 Ziemowit Laski <zlaski@apple.com>
* objc/NXConstStr.h: Update copyright date; bracket with
'extern "C"' for C++ use; make include syntax consistent
by using <...> instead of "..."; hoist <objc/...> includes
above the 'extern "C"' block.
* objc/Object.h: Likewise.
* objc/Protocol.h: Likewise.
* objc/encoding.h: Likewise.
* objc/hash.h: Likewise.
* objc/runtime.h: Likewise.
* objc/sarray.h: Likewise.
* objc/thr.h: Likewise.
* objc/typedstream.h: Likewise.
* objc/objc-api.h: Add 'extern "C"' block for C++ use.
(objc_static_instances): For C++ case, do away with
zero-sized array.
(objc_method): Hoist definition to file scope.
(_objc_load_callback, _objc_object_alloc, class_get_class_method,
class_get_instance_method, class_create_instance,
class_get_class_name, class_get_instance_size,
class_get_meta_class, class_get_super_class, class_get_version,
class_is_class, class_is_meta_class, class_set_version,
class_get_gc_object_type, class_ivar_set_gcinvisible,
get_imp): Rename 'class' parameter to '_class'.
* objc/objc-list.h: Add 'extern "C"' block for C++ use.
* objc/objc.h: Update copyright date.
(arglist_t): Provide a union tag.
From-SVN: r85927
2004-08-13 04:06:37 +02:00
|
|
|
#include <objc/thr.h> /* thread and mutex support */
|
1998-09-21 03:22:07 +02:00
|
|
|
|
NXConstStr.h: Update copyright date...
2004-08-12 Ziemowit Laski <zlaski@apple.com>
* objc/NXConstStr.h: Update copyright date; bracket with
'extern "C"' for C++ use; make include syntax consistent
by using <...> instead of "..."; hoist <objc/...> includes
above the 'extern "C"' block.
* objc/Object.h: Likewise.
* objc/Protocol.h: Likewise.
* objc/encoding.h: Likewise.
* objc/hash.h: Likewise.
* objc/runtime.h: Likewise.
* objc/sarray.h: Likewise.
* objc/thr.h: Likewise.
* objc/typedstream.h: Likewise.
* objc/objc-api.h: Add 'extern "C"' block for C++ use.
(objc_static_instances): For C++ case, do away with
zero-sized array.
(objc_method): Hoist definition to file scope.
(_objc_load_callback, _objc_object_alloc, class_get_class_method,
class_get_instance_method, class_create_instance,
class_get_class_name, class_get_instance_size,
class_get_meta_class, class_get_super_class, class_get_version,
class_is_class, class_is_meta_class, class_set_version,
class_get_gc_object_type, class_ivar_set_gcinvisible,
get_imp): Rename 'class' parameter to '_class'.
* objc/objc-list.h: Add 'extern "C"' block for C++ use.
* objc/objc.h: Update copyright date.
(arglist_t): Provide a union tag.
From-SVN: r85927
2004-08-13 04:06:37 +02:00
|
|
|
#include <objc/hash.h> /* hash structures */
|
|
|
|
#include <objc/objc-list.h> /* linear lists */
|
1998-09-21 03:22:07 +02:00
|
|
|
|
2004-06-25 06:31:51 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1998-09-21 03:22:07 +02:00
|
|
|
extern void __objc_add_class_to_hash(Class); /* (objc-class.c) */
|
|
|
|
extern void __objc_init_selector_tables(void); /* (objc-sel.c) */
|
|
|
|
extern void __objc_init_class_tables(void); /* (objc-class.c) */
|
|
|
|
extern void __objc_init_dispatch_tables(void); /* (objc-dispatch.c) */
|
|
|
|
extern void __objc_install_premature_dtable(Class); /* (objc-dispatch.c) */
|
|
|
|
extern void __objc_resolve_class_links(void); /* (objc-class.c) */
|
|
|
|
extern void __objc_register_selectors_from_class(Class); /* (objc-sel.c) */
|
2004-05-25 21:10:54 +02:00
|
|
|
extern void __objc_register_selectors_from_list (MethodList_t); /* (selector.c) */
|
1998-09-21 03:22:07 +02:00
|
|
|
extern void __objc_update_dispatch_table_for_class (Class);/* (objc-msg.c) */
|
|
|
|
|
|
|
|
extern int __objc_init_thread_system(void); /* thread.c */
|
|
|
|
extern int __objc_fini_thread_system(void); /* thread.c */
|
|
|
|
extern void __objc_print_dtable_stats(void); /* sendmsg.c */
|
|
|
|
|
|
|
|
extern void class_add_method_list(Class, MethodList_t);
|
|
|
|
|
|
|
|
/* Registering instance methods as class methods for root classes */
|
|
|
|
extern void __objc_register_instance_methods_to_class(Class);
|
|
|
|
extern Method_t search_for_method_in_list(MethodList_t list, SEL op);
|
|
|
|
|
|
|
|
/* True when class links has been resolved */
|
|
|
|
extern BOOL __objc_class_links_resolved;
|
|
|
|
|
|
|
|
/* Number of selectors stored in each of the selector tables */
|
2002-06-21 16:36:37 +02:00
|
|
|
extern unsigned int __objc_selector_max_index;
|
1998-09-21 03:22:07 +02:00
|
|
|
|
|
|
|
/* Mutex locking __objc_selector_max_index and its arrays. */
|
|
|
|
extern objc_mutex_t __objc_runtime_mutex;
|
|
|
|
|
|
|
|
/* Number of threads which are alive. */
|
|
|
|
extern int __objc_runtime_threads_alive;
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define DEBUG_PRINTF(format, args...) printf (format, ## args)
|
|
|
|
#else
|
|
|
|
#define DEBUG_PRINTF(format, args...)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
BOOL __objc_responds_to (id object, SEL sel); /* for internal use only! */
|
|
|
|
SEL __sel_register_typed_name (const char*, const char*,
|
|
|
|
struct objc_selector*, BOOL is_const);
|
2002-06-21 16:36:37 +02:00
|
|
|
extern void __objc_generate_gc_type_description (Class);
|
1998-09-21 03:22:07 +02:00
|
|
|
|
2004-06-25 06:31:51 +02:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
1998-09-21 03:22:07 +02:00
|
|
|
#endif /* not __objc_runtime_INCLUDE_GNU */
|