Skip to content

Commit

Permalink
use enif_{alloc,free} for STBIR_{MALLOC,FREE}
Browse files Browse the repository at this point in the history
  • Loading branch information
cocoa-xu committed Mar 10, 2024
1 parent ba8516e commit 5eb3d71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions c_src/stb_image_nif.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#define STBIW_WINDOWS_UTF8
#include <stb_image.h>
#include <stb_image_write.h>
#define STBIR_MALLOC(size,user_data) ((void)(user_data), enif_alloc(size))
#define STBIR_FREE(ptr,user_data) ((void)(user_data), enif_free(ptr))
#include <stb_image_resize2.h>
#include <stdbool.h>
#include <stdio.h>
Expand Down

0 comments on commit 5eb3d71

Please sign in to comment.