* src/native/localref.h: Added or fixed extern "C".
authorChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 25 Aug 2008 13:55:44 +0000 (15:55 +0200)
committerChristian Thalinger <twisti@complang.tuwien.ac.at>
Mon, 25 Aug 2008 13:55:44 +0000 (15:55 +0200)
* src/native/native.h,
src/toolbox/hashtable.h,
src/vm/annotation.h,
src/vm/class.h,
src/vm/descriptor.h,
src/vm/field.hpp,
src/vm/linker.h,
src/vm/method.h,
src/vm/utf8.h: Likewise.

src/native/localref.h
src/native/native.h
src/toolbox/hashtable.h
src/vm/annotation.h
src/vm/class.h
src/vm/descriptor.h
src/vm/field.hpp
src/vm/linker.h
src/vm/method.h
src/vm/utf8.h

index b1df773fde79c34795c1785889f3ade5a19afc51..4e0e35e00378117d582bfbe1a301af523062a0ac 100644 (file)
@@ -32,10 +32,6 @@ typedef struct localref_table localref_table;
 
 #include "config.h"
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "vm/types.h"
 
 #include "vm/global.h"
@@ -72,6 +68,10 @@ extern localref_table *_no_threads_localref_table;
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 bool localref_table_init(void);
 bool localref_table_destroy(void);
 void localref_table_add(localref_table *lrt);
index a62828c27ddd8ad55b11a73fe34b24d05cecd592..d795b28db9be4db65711bf4881eb6c4d4e9dc555 100644 (file)
 
 #include <stdint.h>
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "native/jni.hpp"
 
 #include "vm/class.h"
@@ -97,6 +93,10 @@ struct hashtable_library_name_entry {
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 bool native_init(void);
 
 void        native_method_register(utf *classname, const JNINativeMethod *methods, int32_t count);
index 40d41efcb4537870607945e83f77182079c05888..65b166e41defb5fcdec43d9b46ae216975b756f9 100644 (file)
@@ -105,6 +105,10 @@ struct hashtable {
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* create hashtable */
 void hashtable_create(hashtable *hash, u4 size);
 
@@ -114,6 +118,10 @@ hashtable *hashtable_resize(hashtable *hash, u4 size);
 /* frees a hashtable */
 void hashtable_free(hashtable *hash);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _HASHTABLE_H */
 
 
index 2b0a5432a617b0f72b8810e27c1e2be5fde5f77b..2450132b2d8917a7869ba84ef3717596a605fff4 100644 (file)
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 bool annotation_load_class_attribute_runtimevisibleannotations(
        classbuffer *cb);
 
@@ -67,6 +71,10 @@ bool annotation_load_method_attribute_runtimevisibleparameterannotations(
 bool annotation_load_method_attribute_runtimeinvisibleparameterannotations(
        classbuffer *cb, methodinfo *m);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _ANNOTATION_H */
 
 
index 92ecbb73114f08d68704b6436f6c914c16f5b5d8..5e25a51b7423e75df667490828ff30a24ab18f52 100644 (file)
 #ifndef _CLASS_H
 #define _CLASS_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* forward typedefs ***********************************************************/
 
 typedef struct classinfo      classinfo; 
@@ -195,6 +191,10 @@ struct extra_classref {
 
 /* inline functions ***********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Returns the classname of the class, where slashes ('/') are
  * replaced by dots ('.').
index 1f104a0f770574452bd2ec52756b6d3d803055e4..87fb9c7febcc16253747658c437dc3ba98920253 100644 (file)
@@ -151,6 +151,10 @@ struct methoddesc {
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 descriptor_pool * descriptor_pool_new(classinfo *referer);
 
 bool descriptor_pool_add_class(descriptor_pool *pool,utf *name);
@@ -182,6 +186,10 @@ void descriptor_debug_print_paramdesc(FILE *file,paramdesc *d);
 void descriptor_pool_debug_dump(descriptor_pool *pool, FILE *file);
 #endif /* !defined(NDEBUG) */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _DESCRIPTOR_H */
 
 
index 7904fdf6bea8de83309045653536bffc7e9de33e..52c33ebbd21428c3c46391c65865aac639c7a437 100644 (file)
@@ -68,6 +68,10 @@ struct fieldinfo {         /* field of a class                                 */
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 bool       field_load(classbuffer *cb, fieldinfo *f, descriptor_pool *descpool);
 classinfo *field_get_type(fieldinfo *f);
 void       field_free(fieldinfo *f);
@@ -82,6 +86,10 @@ void field_fieldref_print(constant_FMIref *fr);
 void field_fieldref_println(constant_FMIref *fr);
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _FIELD_HPP */
 
 
index 2e518bb84c87f46e5eeb66fa07d6adf2431eba53..6733c5ed1a059e85c9f848478f37373e86e19fbc 100644 (file)
@@ -143,10 +143,18 @@ extern Mutex *linker_classrenumber_mutex;
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void       linker_preinit(void);
 void       linker_init(void);
 classinfo *link_class(classinfo *c);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _LINKER_H */
 
 
index 0b9b60dd3943c61b034ebc1f105f1de57568a825..994a6c22916811060068ba0a748c438e70920802 100644 (file)
 #ifndef _METHOD_H
 #define _METHOD_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /* forward typedefs ***********************************************************/
 
 typedef struct methodinfo          methodinfo; 
@@ -167,6 +163,10 @@ struct lineinfo {
 extern methodinfo *method_java_lang_reflect_Method_invoke;
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* inline functions ***********************************************************/
 
 inline static bool method_is_builtin(methodinfo* m)
index 91d2a2d9c66577ea82d2b4de13ee8daba383fab6..8a1197ebf619715b50361bf5c851cea3a950dc17 100644 (file)
@@ -226,6 +226,10 @@ extern utf *array_packagename;
 
 /* function prototypes ********************************************************/
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* initialize the utf8 subsystem */
 void utf8_init(void);
 
@@ -289,6 +293,10 @@ bool is_valid_name_utf(utf *u);
 /* show utf-table */
 void utf_show(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _UTF_H */