From f9616655ed9bfa95b0899632682cf10ea33e2ae2 Mon Sep 17 00:00:00 2001 From: NotAHero04 <84689840+NotAHero04@users.noreply.github.com> Date: Thu, 20 Oct 2022 10:39:12 +0700 Subject: [PATCH] Update GLFWImage.java wrap deprecated functions --- .../src/main/java/org/lwjgl/glfw/GLFWImage.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java index 43014d92e..f2e4cf948 100644 --- a/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java +++ b/jre_lwjgl3glfw/src/main/java/org/lwjgl/glfw/GLFWImage.java @@ -255,7 +255,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param stack the stack from which to allocate */ public static GLFWImage mallocStack(MemoryStack stack) { - return wrap(GLFWImage.class, stack.nmalloc(ALIGNOF, SIZEOF)); + return malloc(stack); } /** @@ -264,7 +264,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param stack the stack from which to allocate */ public static GLFWImage callocStack(MemoryStack stack) { - return wrap(GLFWImage.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); + return calloc(stack); } /** @@ -292,7 +292,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param capacity the buffer capacity */ public static GLFWImage.Buffer mallocStack(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); + return malloc(capacity, stack); } /** @@ -302,7 +302,7 @@ public class GLFWImage extends Struct implements NativeResource { * @param capacity the buffer capacity */ public static GLFWImage.Buffer callocStack(int capacity, MemoryStack stack) { - return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); + return calloc(capacity, stack); } // ----------------------------------- @@ -401,4 +401,4 @@ public class GLFWImage extends Struct implements NativeResource { } -} \ No newline at end of file +}