wibo/handles.h

19 lines
296 B
C
Raw Permalink Normal View History

#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);
}