Skip to content
Permalink
Browse files
Renamed internal_malloc() and internal_free().
This is to prevent namespace clash if we statically link MojoShader to an app.
  • Loading branch information
icculus committed Feb 7, 2009
1 parent 0f57738 commit 85e84ce291f0ae02778955ba8fc4cc7c48b1d4ad

File 3 of 4 in 85e84ce

@@ -132,11 +132,11 @@ typedef int32_t int32;
// #define this to force app to supply an allocator, so there's no reference
// to the C runtime's malloc() and free()...
#if MOJOSHADER_FORCE_ALLOCATOR
#define internal_malloc NULL
#define internal_free NULL
#define MOJOSHADER_internal_malloc NULL
#define MOJOSHADER_internal_free NULL
#else
static void *internal_malloc(int bytes, void *d) { return malloc(bytes); }
static void internal_free(void *ptr, void *d) { free(ptr); }
void *MOJOSHADER_internal_malloc(int bytes, void *d);
void MOJOSHADER_internal_free(void *ptr, void *d);
#endif

// result modifiers.

0 comments on commit 85e84ce

Please sign in to comment.