PR143: don't hang with invalid locale
[cacao.git] / src / native / llni.h
index 043d82964baa26a3bcd6e12dc88b8e9857ab4735..77cb9299b68a2000778c09bc10d8cb0599568513 100644 (file)
 #ifndef _LLNI_H
 #define _LLNI_H
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 #include "config.h"
 
 /* forward defines ************************************************************/
@@ -55,7 +51,7 @@ extern "C" {
 #endif
 
 
-#include "native/localref.h"
+#include "native/localref.hpp"
 
 #include "threads/thread.hpp"
 
@@ -121,9 +117,6 @@ extern "C" {
 
 #define LLNI_field_direct(obj, field) (LLNI_DIRECT(obj)->field)
 #define LLNI_vftbl_direct(obj)        (LLNI_DIRECT((java_handle_t *) (obj))->vftbl)
-#define LLNI_array_direct(arr, index) (LLNI_DIRECT(arr)->data[(index)])
-#define LLNI_array_data(arr)          (LLNI_DIRECT(arr)->data)
-#define LLNI_array_size(arr)          (LLNI_DIRECT((java_handle_objectarray_t *) (arr))->header.size)
 
 
 /* LLNI critical sections ******************************************************
@@ -149,6 +142,10 @@ extern "C" {
 # define LLNI_CRITICAL_END_THREAD(t)
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 void llni_critical_start();
 void llni_critical_end();
 void llni_critical_start_thread(threadobject *t);