Skip to content

Commit

Permalink
fix(zstd) remove deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Feb 15, 2023
1 parent db0a4cd commit b44ba7a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ public VmaPoolCreateInfo(ByteBuffer container) {
public VmaPoolCreateInfo pMemoryAllocateNext(VkExportMemoryWin32HandleInfoNV value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkExportMetalObjectCreateInfoEXT} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo pMemoryAllocateNext(VkExportMetalObjectCreateInfoEXT value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportAndroidHardwareBufferInfoANDROID} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo pMemoryAllocateNext(VkImportAndroidHardwareBufferInfoANDROID value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportMemoryFdInfoKHR} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo pMemoryAllocateNext(VkImportMemoryFdInfoKHR value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportMemoryHostPointerInfoEXT} value to the {@code pMemoryAllocateNext} chain. */
Expand Down Expand Up @@ -496,6 +498,8 @@ protected VmaPoolCreateInfo getElementFactory() {
public VmaPoolCreateInfo.Buffer pMemoryAllocateNext(VkExportMemoryWin32HandleInfoNV value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkExportMetalObjectCreateInfoEXT} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo.Buffer pMemoryAllocateNext(VkExportMetalObjectCreateInfoEXT value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportAndroidHardwareBufferInfoANDROID} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo.Buffer pMemoryAllocateNext(VkImportAndroidHardwareBufferInfoANDROID value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportMemoryFdInfoKHR} value to the {@code pMemoryAllocateNext} chain. */
public VmaPoolCreateInfo.Buffer pMemoryAllocateNext(VkImportMemoryFdInfoKHR value) { return this.pMemoryAllocateNext(value.pNext(this.pMemoryAllocateNext()).address()); }
/** Prepends the specified {@link VkImportMemoryHostPointerInfoEXT} value to the {@code pMemoryAllocateNext} chain. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,13 +465,6 @@ JNIEXPORT jlong JNICALL Java_org_lwjgl_util_zstd_ZstdX_nZSTD_1compressBegin_1usi
return (jlong)ZSTD_compressBegin_usingCDict(cctx, cdict);
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_util_zstd_ZstdX_nZSTD_1copyCCtx(JNIEnv *__env, jclass clazz, jlong cctxAddress, jlong preparedCCtxAddress, jlong pledgedSrcSize) {
ZSTD_CCtx *cctx = (ZSTD_CCtx *)(uintptr_t)cctxAddress;
ZSTD_CCtx const *preparedCCtx = (ZSTD_CCtx const *)(uintptr_t)preparedCCtxAddress;
UNUSED_PARAMS(__env, clazz)
return (jlong)ZSTD_copyCCtx(cctx, preparedCCtx, (unsigned long long)pledgedSrcSize);
}

JNIEXPORT jlong JNICALL Java_org_lwjgl_util_zstd_ZstdX_nZSTD_1compressContinue(JNIEnv *__env, jclass clazz, jlong cctxAddress, jlong dstAddress, jlong dstCapacity, jlong srcAddress, jlong srcSize) {
ZSTD_CCtx *cctx = (ZSTD_CCtx *)(uintptr_t)cctxAddress;
void *dst = (void *)(uintptr_t)dstAddress;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1768,21 +1768,6 @@ public static long ZSTD_compressBegin_usingCDict(@NativeType("ZSTD_CCtx *") long
return nZSTD_compressBegin_usingCDict(cctx, cdict);
}

// --- [ ZSTD_copyCCtx ] ---

/** Unsafe version of: {@link #ZSTD_copyCCtx copyCCtx} */
public static native long nZSTD_copyCCtx(long cctx, long preparedCCtx, long pledgedSrcSize);

/** @param pledgedSrcSize if not known, use {@link Zstd#ZSTD_CONTENTSIZE_UNKNOWN CONTENTSIZE_UNKNOWN} */
@NativeType("size_t")
public static long ZSTD_copyCCtx(@NativeType("ZSTD_CCtx *") long cctx, @NativeType("ZSTD_CCtx const *") long preparedCCtx, @NativeType("unsigned long long") long pledgedSrcSize) {
if (CHECKS) {
check(cctx);
check(preparedCCtx);
}
return nZSTD_copyCCtx(cctx, preparedCCtx, pledgedSrcSize);
}

// --- [ ZSTD_compressContinue ] ---

public static native long nZSTD_compressContinue(long cctx, long dst, long dstCapacity, long src, long srcSize);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1414,15 +1414,6 @@ v v v
ZSTD_CDict.const.p("cdict", "")
)

size_t(
"copyCCtx",
"",

ZSTD_CCtx.p("cctx", ""),
ZSTD_CCtx.const.p("preparedCCtx", ""),
unsigned_long_long("pledgedSrcSize", "if not known, use #CONTENTSIZE_UNKNOWN")
)

size_t(
"compressContinue",
"",
Expand Down

0 comments on commit b44ba7a

Please sign in to comment.