astffi.llvm.0.1.2.source-code.jni_com_alibaba_fastffi_stdcxx_StdString_cxx_0xcec1e274.cc Maven / Gradle / Ivy
The newest version!
#include
#include
#include
#ifdef __cplusplus
extern "C" {
#endif
// Common Stubs
JNIEXPORT
jint JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274__1elementSize_00024_00024_00024(JNIEnv*, jclass) {
return (jint)sizeof(std::string);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeC_1str(JNIEnv*, jclass, jlong ptr) {
return (jlong)(reinterpret_cast(ptr)->c_str());
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeData(JNIEnv*, jclass, jlong ptr) {
return (jlong)(reinterpret_cast(ptr)->data());
}
JNIEXPORT
void JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeDelete(JNIEnv*, jclass, jlong ptr) {
delete reinterpret_cast(ptr);
}
JNIEXPORT
void JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeResize(JNIEnv*, jclass, jlong ptr, jlong arg0 /* size0 */) {
reinterpret_cast(ptr)->resize(arg0);
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeSize(JNIEnv*, jclass, jlong ptr) {
return (jlong)(reinterpret_cast(ptr)->size());
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeCreateFactory0(JNIEnv*, jclass) {
return reinterpret_cast(new std::string());
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeCreateFactory1(JNIEnv*, jclass, jlong arg0 /* buf0 */) {
return reinterpret_cast(new std::string(reinterpret_cast(arg0)));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeCreateFactory2(JNIEnv*, jclass, jlong arg0 /* buf0 */, jlong arg1 /* length1 */) {
return reinterpret_cast(new std::string(reinterpret_cast(arg0), arg1));
}
JNIEXPORT
jlong JNICALL Java_com_alibaba_fastffi_stdcxx_StdString_1cxx_10xcec1e274_nativeCreateFactory3(JNIEnv*, jclass, jlong arg0 /* string0 */) {
return reinterpret_cast(new std::string(*reinterpret_cast(arg0)));
}
#ifdef __cplusplus
}
#endif