#include "mm/memory.hpp"
#include "native/jni.hpp"
-#include "native/llni.h"
#include "native/native.hpp"
#if defined(ENABLE_JNI_HEADERS)
// The hostname byte-array is a NULL terminated C-string.
// XXX Not GC safe.
- char* name = (char*) &(LLNI_array_data((java_handle_bytearray_t*) hostname));
+ ByteArray ba(hostname);
+ char* name = (char*) ba.get_raw_data_ptr();
/* get the host */
{
// Get pointer to the buffer.
// XXX Not GC safe.
- void* buf = &(LLNI_array_direct((java_handle_bytearray_t*) b, off));
+ ByteArray ba(b);
+ void* buf = (void*) (((int8_t*) ba.get_raw_data_ptr()) + off);
// Receive from the socket.
ssize_t result = recv(handle, buf, len, 0);
{
// Get pointer to the buffer.
// XXX Not GC safe.
- void* buf = &(LLNI_array_direct((java_handle_bytearray_t*) b, off));
+ ByteArray ba(b);
+ void* buf = (void*) (((int8_t*) ba.get_raw_data_ptr()) + off);
// Send the given byte to the socket.
ssize_t result = send(handle, buf, len, 0);