X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=typescript_strings.py;h=84b27c5723a66521d7f737ac486313b1aac52cb2;hb=1d33d979ae201a095542e11b0de70516a9f456db;hp=c097921f7d43de5ebc733be09392e1b24e19a6e4;hpb=d301850c040851daf6ab1d4ec2d4cd04f8869067;p=ldk-java diff --git a/typescript_strings.py b/typescript_strings.py index c097921f..84b27c57 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -120,7 +120,7 @@ void *malloc(size_t size); void free(void *ptr); #define MALLOC(a, _) malloc(a) -#define FREE(p) if ((long)(p) > 1024) { free(p); } +#define FREE(p) if ((unsigned long)(p) > 1024) { free(p); } #define DO_ASSERT(a) (void)(a) #define CHECK(a) """ @@ -174,7 +174,7 @@ static void alloc_freed(void* ptr) { __real_free(it); } static void FREE(void* ptr) { - if ((long)ptr < 1024) return; // Rust loves to create pointers to the NULL page for dummys + if ((unsigned long)ptr < 1024) return; // Rust loves to create pointers to the NULL page for dummys alloc_freed(ptr); __real_free(ptr); }