mirror of
https://codeberg.org/ACM/TinyGL-C89.git
synced 2025-08-17 05:03:32 -04:00
Add C89 support
Allow compilation from C89 compilers.
This commit is contained in:
parent
fb4cb83981
commit
9a779bf1a1
66 changed files with 12202 additions and 0 deletions
23
src/memory.c
Normal file
23
src/memory.c
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* Memory allocator for TinyGL
|
||||
*/
|
||||
#include "zgl.h"
|
||||
|
||||
/* modify these functions so that they suit your needs */
|
||||
|
||||
void gl_free(void *p)
|
||||
{
|
||||
free(p);
|
||||
}
|
||||
|
||||
void *gl_malloc(int size)
|
||||
{
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
void *gl_zalloc(int size)
|
||||
{
|
||||
return calloc(1, size);
|
||||
}
|
||||
|
||||
/* --- end of MEMORY_C --- */
|
||||
Loading…
Add table
Add a link
Reference in a new issue