aboutsummaryrefslogtreecommitdiff
path: root/libobjc/objc
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@physics.uc.edu>2004-05-25 19:10:54 +0000
committerAndrew Pinski <pinskia@gcc.gnu.org>2004-05-25 12:10:54 -0700
commit435317e25c1f3571a72d97d089ca085ffd0bf20b (patch)
tree4b71d618aec8fb5c67898b26b6eaab9161fdcf1f /libobjc/objc
parentf411a73a8caf915d2685c5065de6c918de76daad (diff)
downloadgcc-435317e25c1f3571a72d97d089ca085ffd0bf20b.zip
gcc-435317e25c1f3571a72d97d089ca085ffd0bf20b.tar.gz
gcc-435317e25c1f3571a72d97d089ca085ffd0bf20b.tar.bz2
[multiple changes]
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
Diffstat (limited to 'libobjc/objc')
-rw-r--r--libobjc/objc/objc-api.h29
-rw-r--r--libobjc/objc/objc-decls.h47
-rw-r--r--libobjc/objc/runtime.h3
3 files changed, 64 insertions, 15 deletions
diff --git a/libobjc/objc/objc-api.h b/libobjc/objc/objc-api.h
index dc8af06..52ad50a 100644
--- a/libobjc/objc/objc-api.h
+++ b/libobjc/objc/objc-api.h
@@ -1,5 +1,5 @@
/* GNU Objective-C Runtime API.
- Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc.
This file is part of GCC.
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA. */
#include "objc/objc.h"
#include "objc/hash.h"
#include "objc/thr.h"
+#include "objc/objc-decls.h"
#include <stdio.h>
#include <stdarg.h>
@@ -100,7 +101,7 @@ struct objc_method_description
extern void objc_error(id object, int code, const char* fmt, ...);
extern void objc_verror(id object, int code, const char* fmt, va_list ap);
typedef BOOL (*objc_error_handler)(id, int code, const char *fmt, va_list ap);
-objc_error_handler objc_set_error_handler(objc_error_handler func);
+extern objc_error_handler objc_set_error_handler(objc_error_handler func);
/*
** Error codes
@@ -361,7 +362,7 @@ retval_t objc_msg_sendv(id, SEL, arglist_t);
** This may e.g. try to load in the class using dynamic loading.
** The function is guaranteed to be passed a non-NULL name string.
*/
-extern Class (*_objc_lookup_class)(const char *name);
+objc_EXPORT Class (*_objc_lookup_class)(const char *name);
/*
** This is a hook which is called by __objc_exec_class every time a class
@@ -369,14 +370,14 @@ extern Class (*_objc_lookup_class)(const char *name);
** dynamic loader determine the classes that have been loaded when
** an object file is dynamically linked in.
*/
-extern void (*_objc_load_callback)(Class class, Category* category);
+objc_EXPORT void (*_objc_load_callback)(Class class, Category* category);
/*
** Hook functions for allocating, copying and disposing of instances
*/
-extern id (*_objc_object_alloc)(Class class);
-extern id (*_objc_object_copy)(id object);
-extern id (*_objc_object_dispose)(id object);
+objc_EXPORT id (*_objc_object_alloc)(Class class);
+objc_EXPORT id (*_objc_object_copy)(id object);
+objc_EXPORT id (*_objc_object_dispose)(id object);
/*
** Standard functions for memory allocation and disposal.
@@ -412,19 +413,19 @@ objc_free(void *mem);
** Users should call the normal objc routines above for
** memory allocation and disposal within their programs.
*/
-extern void *(*_objc_malloc)(size_t);
-extern void *(*_objc_atomic_malloc)(size_t);
-extern void *(*_objc_valloc)(size_t);
-extern void *(*_objc_realloc)(void *, size_t);
-extern void *(*_objc_calloc)(size_t, size_t);
-extern void (*_objc_free)(void *);
+objc_EXPORT void *(*_objc_malloc)(size_t);
+objc_EXPORT void *(*_objc_atomic_malloc)(size_t);
+objc_EXPORT void *(*_objc_valloc)(size_t);
+objc_EXPORT void *(*_objc_realloc)(void *, size_t);
+objc_EXPORT void *(*_objc_calloc)(size_t, size_t);
+objc_EXPORT void (*_objc_free)(void *);
/*
** Hook for method forwarding. This makes it easy to substitute a
** library, such as ffcall, that implements closures, thereby avoiding
** gcc's __builtin_apply problems.
*/
-extern IMP (*__objc_msg_forward)(SEL);
+objc_EXPORT IMP (*__objc_msg_forward)(SEL);
Method_t class_get_class_method(MetaClass class, SEL aSel);
diff --git a/libobjc/objc/objc-decls.h b/libobjc/objc/objc-decls.h
new file mode 100644
index 0000000..6d64c3bb
--- /dev/null
+++ b/libobjc/objc/objc-decls.h
@@ -0,0 +1,47 @@
+/* GNU Objective-C Extern helpers for Win32.
+ Copyright (C) 2004 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2, or (at your option) any
+later version.
+
+GCC is distributed in the hope that it will be useful, but WITHOUT
+ANY 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 GCC; see the file COPYING. If not, write to
+the Free Software 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_decls_INCLUDE_GNU
+#define __objc_decls_INCLUDE_GNU
+
+#if defined (_WIN32) || defined (__WIN32__) || defined (WIN32)
+
+# ifdef DLL_EXPORT /* defined by libtool (if required) */
+# define objc_EXPORT __declspec(dllexport)
+# define objc_DECLARE __declspec(dllexport)
+#else
+# define objc_EXPORT extern __declspec(dllimport)
+# define objc_DECLARE extern __declspec(dllimport)
+#endif
+
+#else
+
+# define objc_EXPORT extern
+# define objc_DECLARE
+
+#endif
+
+#endif /* __objc_decls_INCLUDE_GNU */
diff --git a/libobjc/objc/runtime.h b/libobjc/objc/runtime.h
index 72e79be..17a3e5e 100644
--- a/libobjc/objc/runtime.h
+++ b/libobjc/objc/runtime.h
@@ -1,5 +1,5 @@
/* GNU Objective C Runtime internal declarations
- Copyright (C) 1993, 1995, 1996, 1997, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1995, 1996, 1997, 2002, 2004 Free Software Foundation, Inc.
Contributed by Kresten Krab Thorup
This file is part of GCC.
@@ -49,6 +49,7 @@ 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) */
+extern void __objc_register_selectors_from_list (MethodList_t); /* (selector.c) */
extern void __objc_update_dispatch_table_for_class (Class);/* (objc-msg.c) */
extern int __objc_init_thread_system(void); /* thread.c */