mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 13:41:12 +08:00
encoding.h: Wrap the functions with extern "C" for C++ mode.
2004-06-24 Andrew Pinski <apinski@apple.com> * objc/encoding.h: Wrap the functions with extern "C" for C++ mode. * objc/hash.h: Likewise. * objc/objc-api.h: Likewise. * objc/objc-list.h: Likewise. * objc/runtime.h: Likewise. * objc/sarray.h: Likewise. * objc/thr.h: Likewise. * objc/typedstream.h: Likewise. From-SVN: r83635
This commit is contained in:
parent
fff34d356a
commit
6f0aa5e195
@ -1,3 +1,16 @@
|
||||
2004-06-24 Andrew Pinski <apinski@apple.com>
|
||||
|
||||
* objc/encoding.h: Wrap the functions with extern "C" for C++
|
||||
mode.
|
||||
* objc/hash.h: Likewise.
|
||||
* objc/objc-api.h: Likewise.
|
||||
* objc/objc-list.h: Likewise.
|
||||
* objc/runtime.h: Likewise.
|
||||
* objc/sarray.h: Likewise.
|
||||
* objc/thr.h: Likewise.
|
||||
* objc/typedstream.h: Likewise.
|
||||
|
||||
|
||||
2004-06-21 Nick Clifton <nickc@redhat.com>
|
||||
|
||||
* encoding.c (BITS_PER_UNIT): Define if a definition is not
|
||||
|
@ -32,6 +32,10 @@ Boston, MA 02111-1307, USA. */
|
||||
#include <ctype.h>
|
||||
#include "objc/objc-api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#define _C_CONST 'r'
|
||||
#define _C_IN 'n'
|
||||
#define _C_INOUT 'N'
|
||||
@ -96,4 +100,8 @@ void objc_layout_structure_get_info (struct objc_struct_layout *layout,
|
||||
unsigned int *align,
|
||||
const char **type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __encoding_INCLUDE_GNU */
|
||||
|
@ -32,6 +32,11 @@ Boston, MA 02111-1307, USA. */
|
||||
#include <string.h>
|
||||
#include <objc/objc.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/*
|
||||
* This data structure is used to hold items
|
||||
* stored in a hash table. Each node holds
|
||||
@ -203,5 +208,9 @@ compare_strings (const void *k1, const void *k2)
|
||||
return ! strcmp ((const char *) k1, (const char *) k2);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __hash_INCLUDE_GNU */
|
||||
|
@ -34,6 +34,11 @@ Boston, MA 02111-1307, USA. */
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* For functions which return Method_t */
|
||||
#define METHOD_NULL (Method_t)0
|
||||
/* Boolean typedefs */
|
||||
@ -606,6 +611,11 @@ object_is_meta_class (id object)
|
||||
struct sarray*
|
||||
objc_get_uninstalled_dtable(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __objc_api_INCLUDE_GNU */
|
||||
|
||||
|
||||
|
@ -28,6 +28,11 @@ Boston, MA 02111-1307, USA. */
|
||||
#ifndef __GNU_OBJC_LIST_H
|
||||
#define __GNU_OBJC_LIST_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
struct objc_list {
|
||||
void *head;
|
||||
struct objc_list *tail;
|
||||
@ -144,4 +149,10 @@ list_free(struct objc_list* list)
|
||||
objc_free(list);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __GNU_OBJC_LIST_H */
|
||||
|
@ -42,6 +42,11 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
#include "objc/hash.h" /* hash structures */
|
||||
#include "objc/objc-list.h" /* linear lists */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
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) */
|
||||
@ -85,6 +90,11 @@ SEL __sel_register_typed_name (const char*, const char*,
|
||||
struct objc_selector*, BOOL is_const);
|
||||
extern void __objc_generate_gc_type_description (Class);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __objc_runtime_INCLUDE_GNU */
|
||||
|
||||
|
||||
|
@ -43,11 +43,20 @@ extern const char* __objc_sparse3_id;
|
||||
|
||||
#include "objc/thr.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
extern int nbuckets; /* for stats */
|
||||
extern int nindices;
|
||||
extern int narrays;
|
||||
extern int idxsize;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
/* An unsigned integer of same size as a pointer */
|
||||
@ -142,6 +151,10 @@ struct sarray {
|
||||
size_t capacity;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
struct sarray* sarray_new(int, void* default_element);
|
||||
void sarray_free(struct sarray*);
|
||||
struct sarray* sarray_lazy_copy(struct sarray*);
|
||||
@ -234,4 +247,9 @@ static inline void* sarray_get_safe(struct sarray* array, sidx indx)
|
||||
return (array->empty_bucket->elems[0]);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* __sarray_INCLUDE_GNU */
|
||||
|
@ -40,6 +40,10 @@ Boston, MA 02111-1307, USA. */
|
||||
|
||||
#include "objc/objc.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/*************************************************************************
|
||||
* Universal static variables:
|
||||
*/
|
||||
@ -142,4 +146,9 @@ objc_thread_t __objc_thread_id (void);
|
||||
int __objc_thread_set_data (void *value);
|
||||
void * __objc_thread_get_data (void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __thread_INCLUDE_GNU */
|
||||
|
@ -31,6 +31,11 @@ Boston, MA 02111-1307, USA. */
|
||||
#include "objc/hash.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
typedef int (*objc_typed_read_func)(void*, char*, int);
|
||||
typedef int (*objc_typed_write_func)(void*, const char*, int);
|
||||
typedef int (*objc_typed_flush_func)(void*);
|
||||
@ -129,4 +134,9 @@ void objc_close_typed_stream (TypedStream* stream);
|
||||
BOOL objc_end_of_typed_stream (TypedStream* stream);
|
||||
void objc_flush_typed_stream (TypedStream* stream);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
#endif /* not __typedstream_INCLUDE_GNU */
|
||||
|
Loading…
x
Reference in New Issue
Block a user