我需要从Java调用C函数。
该函数具有以下API:
我正在使用swig来制作包装器。
我阅读了这篇帖子: ByteBuffer.allocate() vs. ByteBuffer.allocateDirect() 看起来最好将结果
1. 我如何通过swig将
谢谢。
void convert(char* pchInput, int inputSize, int convertValue, char* pchOutput, int* outputSize);
我正在使用swig来制作包装器。
我阅读了这篇帖子: ByteBuffer.allocate() vs. ByteBuffer.allocateDirect() 看起来最好将结果
(pchOutput)
创建为DirectByteBuffer
。1. 我如何通过swig将
Bytebuffer
传递给c代码?
2. c代码如何从ByteBuffer
中读取和写入数据?谢谢。