Added passthroughs and small fix for malloc/free
This commit is contained in:
1 parent
6a75832b59
commit
9a4507a0f5
3 files changed
+28
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
__if_comp__ __C__ __simple_passthrough__ """
|
||||
#include <stdlib.h>
|
||||
"""
|
||||
|
||||
char* nullPtr = 0;
|
||||
|
||||
char* malloc(int size) {
|
||||
char* memPtr = nullPtr;
|
||||
__if_comp__ __C__ {
|
||||
__simple_passthrough__ """
|
||||
memPtr = malloc(size);
|
||||
"""
|
||||
}
|
||||
return memPtr;
|
||||
}
|
||||
|
||||
void free(char* memPtr) {
|
||||
__if_comp__ __C__ {
|
||||
__simple_passthrough__ """
|
||||
free(memPtr);
|
||||
"""
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user