mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
Fix hot code reloading on linux
This commit is contained in:
parent
3f916efb64
commit
932f6d1bef
@ -386,9 +386,11 @@ string _STR_TMP(const char *fmt, ...) {
|
||||
#include <dlfcn.h>
|
||||
void* live_lib;
|
||||
int load_so(byteptr path) {
|
||||
//printf("load_so %s\\n", path);
|
||||
char cpath[1024];
|
||||
sprintf(cpath,"./%s", path);
|
||||
//printf("load_so %s\\n", cpath);
|
||||
if (live_lib) dlclose(live_lib);
|
||||
live_lib = dlopen(path, RTLD_LAZY);
|
||||
live_lib = dlopen(cpath, RTLD_LAZY);
|
||||
if (!live_lib) {puts("open failed"); exit(1); return 0;}
|
||||
')
|
||||
for so_fn in cgen.so_fns {
|
||||
|
Loading…
Reference in New Issue
Block a user