2 Extern implementation of Nit module native
7 #include "core__native._ffi.h"
9 #include <android/log.h>
10 #define PRINT_ERROR(...) (void)__android_log_print(ANDROID_LOG_WARN, "Nit", __VA_ARGS__)
12 #define PRINT_ERROR(...) fprintf(stderr, __VA_ARGS__)
14 #line 16 "../lib/core/text/native.nit"
21 #include <libkern/OSByteOrder.h>
22 #define be32toh(x) OSSwapBigToHostInt32(x)
26 #define be16toh(val) (((val) >> 8) | ((val) << 8))
27 #define be32toh(val) ((be16toh((val) << 16) | (be16toh((val) >> 16))))
30 #define be32toh(val) betoh32(val)
32 double native___NativeString_atof___impl( char* self
)
34 #line 102 "../lib/core/text/native.nit"
37 long native___NativeString_fetch_4_ffi___impl( char* self
, long pos
)
39 #line 282 "../lib/core/text/native.nit"
41 return (long)*((uint32_t*)(self
+pos
)); }
42 long native___NativeString_fetch_4h_ffi___impl( char* self
, long pos
)
44 #line 283 "../lib/core/text/native.nit"
46 return (long)be32toh(*((uint32_t*)(self
+pos
))); }