Wrap dlopen/dlsym
This commit is contained in:
@@ -7,6 +7,14 @@
|
||||
#include <stdbool.h>
|
||||
#include <uthash.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
// TODO: check if this works
|
||||
#include <minwindef.h>
|
||||
#define PATH_MAX MAX_PATH
|
||||
#else
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
//
|
||||
// TYPES
|
||||
//
|
||||
@@ -352,6 +360,11 @@ struct GroundExecutionResult {
|
||||
} as;
|
||||
};
|
||||
|
||||
struct GroundOpenSharedObjects {
|
||||
char path[PATH_MAX];
|
||||
void* handle;
|
||||
UT_hash_handle hh;
|
||||
};
|
||||
|
||||
//
|
||||
// INTERFACE
|
||||
@@ -522,6 +535,12 @@ struct _Ground {
|
||||
|
||||
char* (*BytecodeValue)(GroundBytecodeValue* value);
|
||||
} Stringify;
|
||||
|
||||
struct {
|
||||
struct GroundOpenSharedObjects* objects;
|
||||
void* (*openSharedObject)(char* id);
|
||||
void* (*getFunction)(void* handle, char* id);
|
||||
} FFI;
|
||||
};
|
||||
|
||||
extern struct _Ground Ground;
|
||||
|
||||
Reference in New Issue
Block a user