Working on improvements to natives. Not done yet.

This commit is contained in:
Andrew Steinborn
2020-09-11 01:46:59 -04:00
parent 7650eedb7a
commit a49a77a7ef
8 changed files with 28 additions and 32 deletions

View File

@@ -8,7 +8,7 @@ typedef unsigned char byte;
JNIEXPORT jlong JNICALL
Java_com_velocitypowered_natives_encryption_OpenSslCipherImpl_init(JNIEnv *env,
jobject obj,
jclass clazz,
jbyteArray key,
jboolean encrypt)
{
@@ -41,7 +41,7 @@ Java_com_velocitypowered_natives_encryption_OpenSslCipherImpl_init(JNIEnv *env,
JNIEXPORT void JNICALL
Java_com_velocitypowered_natives_encryption_OpenSslCipherImpl_free(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ptr)
{
EVP_CIPHER_CTX_free((EVP_CIPHER_CTX *) ptr);
@@ -49,7 +49,7 @@ Java_com_velocitypowered_natives_encryption_OpenSslCipherImpl_free(JNIEnv *env,
JNIEXPORT void JNICALL
Java_com_velocitypowered_natives_encryption_OpenSslCipherImpl_process(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ptr,
jlong source,
jint len,

View File

@@ -7,7 +7,7 @@
JNIEXPORT jlong JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibDeflate_init(JNIEnv *env,
jobject obj,
jclass clazz,
jint level)
{
struct libdeflate_compressor *compressor = libdeflate_alloc_compressor(level);
@@ -21,7 +21,7 @@ Java_com_velocitypowered_natives_compression_NativeZlibDeflate_init(JNIEnv *env,
JNIEXPORT void JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibDeflate_free(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ctx)
{
libdeflate_free_compressor((struct libdeflate_compressor *) ctx);
@@ -29,7 +29,7 @@ Java_com_velocitypowered_natives_compression_NativeZlibDeflate_free(JNIEnv *env,
JNIEXPORT jboolean JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibDeflate_process(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ctx,
jlong sourceAddress,
jint sourceLength,

View File

@@ -7,7 +7,7 @@
JNIEXPORT jlong JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibInflate_init(JNIEnv *env,
jobject obj)
jclass clazz)
{
struct libdeflate_decompressor *decompress = libdeflate_alloc_decompressor();
if (decompress == NULL) {
@@ -21,7 +21,7 @@ Java_com_velocitypowered_natives_compression_NativeZlibInflate_init(JNIEnv *env,
JNIEXPORT void JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibInflate_free(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ctx)
{
libdeflate_free_decompressor((struct libdeflate_decompressor *) ctx);
@@ -29,7 +29,7 @@ Java_com_velocitypowered_natives_compression_NativeZlibInflate_free(JNIEnv *env,
JNIEXPORT jboolean JNICALL
Java_com_velocitypowered_natives_compression_NativeZlibInflate_process(JNIEnv *env,
jobject obj,
jclass clazz,
jlong ctx,
jlong sourceAddress,
jint sourceLength,