Files
wibo/handles.h
Ethan Roseman 6de4e9a163 3 funcs needed for some mwcc compilers (#22)
* 3 funcs needed for some mwcc compilers

* some PR feedback

* lots more via pair programming with Simon

* cleanup, add test dir as an include dir for tests

* bugfix
2022-09-24 23:59:30 +09:00

19 lines
296 B
C++

#include <stdlib.h>
namespace handles {
enum Type {
TYPE_UNUSED,
TYPE_FILE,
TYPE_MAPPED,
};
struct Data {
Type type = TYPE_UNUSED;
void *ptr;
size_t size;
};
Data dataFromHandle(void *handle, bool pop);
void *allocDataHandle(Data data);
}