Skip to content

Commit

Permalink
[ruby/prism] Chage some names
Browse files Browse the repository at this point in the history
- PRISM_CUSTOM_ALLOCATOR -> PRISM_XALLOCATOR
- prism_custom_allocator.h -> prism_xallocator.h

ruby/prism@83b4071e5b
  • Loading branch information
hasumikin authored and matzbot committed Mar 4, 2024
1 parent c4bd6da commit 54f2754
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions prism/defines.h
Expand Up @@ -126,21 +126,21 @@
#endif

/**
* If you build prism with a custom allocator, configure it with "-D PRISM_CUSTOM_ALLOCATOR"
* If you build prism with a custom allocator, configure it with "-D PRISM_XALLOCATOR"
* to use your own allocator that defines xmalloc, xrealloc, xcalloc, and xfree.
* For example, your `custom_allocator.h` file could look like this:
* ```
* #ifndef PRISM_CUSTOM_ALLOCATOR_H
* #define PRISM_CUSTOM_ALLOCATOR_H
* #ifndef PRISM_XALLOCATOR_H
* #define PRISM_XALLOCATOR_H
* #define xmalloc my_malloc
* #define xrealloc my_realloc
* #define xcalloc my_calloc
* #define xfree my_free
* #endif
* ```
*/
#ifdef PRISM_CUSTOM_ALLOCATOR
# include "custom_allocator.h"
#ifdef PRISM_XALLOCATOR
# include "prism_xallocator.h"
#else
# define xmalloc malloc
# define xrealloc realloc
Expand Down

0 comments on commit 54f2754

Please sign in to comment.