Skip to content

Commit cef07fb

Browse files
author
Gaspard Petit
committed
Added parameters to RAPIDJSON_MALLOC, RAPIDJSON_REALLOC and RAPIDJSON_FREE
Signed-off-by: Gaspard Petit <[email protected]>
1 parent ad2e536 commit cef07fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/rapidjson/rapidjson.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -622,15 +622,15 @@ RAPIDJSON_NAMESPACE_END
622622

623623
#ifndef RAPIDJSON_MALLOC
624624
///! customization point for global \c malloc
625-
#define RAPIDJSON_MALLOC std::malloc
625+
#define RAPIDJSON_MALLOC(size) std::malloc(size)
626626
#endif
627627
#ifndef RAPIDJSON_REALLOC
628628
///! customization point for global \c realloc
629-
#define RAPIDJSON_REALLOC std::realloc
629+
#define RAPIDJSON_REALLOC(ptr, new_size) std::realloc(ptr, new_size)
630630
#endif
631631
#ifndef RAPIDJSON_FREE
632632
///! customization point for global \c free
633-
#define RAPIDJSON_FREE std::free
633+
#define RAPIDJSON_FREE(ptr) std::free(ptr)
634634
#endif
635635

636636
///////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)