1 Commits

Author SHA1 Message Date
Abdelrahman Said 02372cb644 Fix mem op supported bug
Release / release (push) Successful in 6s
2026-06-28 21:46:36 +01:00
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
2.1.0 2.1.1
+5 -5
View File
@@ -8,7 +8,7 @@
void *wpMemAllocatorAlloc(const WpAllocator *allocator, u64 size) { void *wpMemAllocatorAlloc(const WpAllocator *allocator, u64 size) {
wpDebugAssert(allocator != NULL && (allocator->alloc) != NULL, "`allocator` and `allocator->alloc` should not be NULL"); wpDebugAssert(allocator != NULL && (allocator->alloc) != NULL, "`allocator` and `allocator->alloc` should not be NULL");
if (wpMemAllocatorOpSupported(allocator, WP_MEM_OP_ALLOC)) { if (!wpMemAllocatorOpSupported(allocator, WP_MEM_OP_ALLOC)) {
return NULL; return NULL;
} }
@@ -18,7 +18,7 @@ void *wpMemAllocatorAlloc(const WpAllocator *allocator, u64 size) {
void *wpMemAllocatorAllocAligned(const WpAllocator *allocator, u64 size, u64 alignment) { void *wpMemAllocatorAllocAligned(const WpAllocator *allocator, u64 size, u64 alignment) {
wpDebugAssert(allocator != NULL && (allocator->alloc_aligned) != NULL, "`allocator` and `allocator->alloc_aligned` should not be NULL"); wpDebugAssert(allocator != NULL && (allocator->alloc_aligned) != NULL, "`allocator` and `allocator->alloc_aligned` should not be NULL");
if (wpMemAllocatorOpSupported(allocator, WP_MEM_OP_ALLOC_ALIGNED)) { if (!wpMemAllocatorOpSupported(allocator, WP_MEM_OP_ALLOC_ALIGNED)) {
return NULL; return NULL;
} }
@@ -28,7 +28,7 @@ void *wpMemAllocatorAllocAligned(const WpAllocator *allocator, u64 size, u64 ali
void *wpMemAllocatorRealloc(const WpAllocator *allocator, void *ptr, u64 old_size, u64 new_size) { void *wpMemAllocatorRealloc(const WpAllocator *allocator, void *ptr, u64 old_size, u64 new_size) {
wpDebugAssert(allocator != NULL && (allocator->realloc) != NULL, "`allocator` and `allocator->realloc` should not be NULL"); wpDebugAssert(allocator != NULL && (allocator->realloc) != NULL, "`allocator` and `allocator->realloc` should not be NULL");
if (wpMemAllocatorOpSupported(allocator, WP_MEM_OP_REALLOC)) { if (!wpMemAllocatorOpSupported(allocator, WP_MEM_OP_REALLOC)) {
return NULL; return NULL;
} }
@@ -39,7 +39,7 @@ void *wpMemAllocatorReallocAligned(const WpAllocator *allocator, void *ptr, u64
u64 new_size, u64 alignment) { u64 new_size, u64 alignment) {
wpDebugAssert(allocator != NULL && (allocator->realloc_aligned) != NULL, "`allocator` and `allocator->realloc_aligned` should not be NULL"); wpDebugAssert(allocator != NULL && (allocator->realloc_aligned) != NULL, "`allocator` and `allocator->realloc_aligned` should not be NULL");
if (wpMemAllocatorOpSupported(allocator, WP_MEM_OP_REALLOC_ALIGNED)) { if (!wpMemAllocatorOpSupported(allocator, WP_MEM_OP_REALLOC_ALIGNED)) {
return NULL; return NULL;
} }
@@ -49,7 +49,7 @@ void *wpMemAllocatorReallocAligned(const WpAllocator *allocator, void *ptr, u64
void wpMemAllocatorFree(const WpAllocator *allocator, void **ptr, u64 size) { void wpMemAllocatorFree(const WpAllocator *allocator, void **ptr, u64 size) {
wpDebugAssert(allocator != NULL && (allocator->free) != NULL, "`allocator` and `allocator->free` should not be NULL"); wpDebugAssert(allocator != NULL && (allocator->free) != NULL, "`allocator` and `allocator->free` should not be NULL");
if (wpMemAllocatorOpSupported(allocator, WP_MEM_OP_FREE)) { if (!wpMemAllocatorOpSupported(allocator, WP_MEM_OP_FREE)) {
return; return;
} }