Skip to content

Commit

Permalink
Mac defines malloc_size to be const void *ptr, not void *ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) committed Jun 20, 2011
1 parent a46d3a1 commit b2c3517
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nedmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ extern
/* Sadly we can't include <malloc.h> as it causes a redefinition error */
size_t malloc_usable_size(void *);
#elif defined(__APPLE__)
size_t malloc_size(void *ptr);
size_t malloc_size(const void *ptr);
#else
#error Do not know what to do here
#endif
Expand Down
2 changes: 1 addition & 1 deletion test.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ extern
/* Sadly we can't include <malloc.h> as it causes a redefinition error */
size_t malloc_usable_size(void *);
#elif defined(__APPLE__)
size_t malloc_size(void *ptr);
size_t malloc_size(const void *ptr);
#else
#error Do not know what to do here
#endif
Expand Down

0 comments on commit b2c3517

Please sign in to comment.