diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/launcher.c | 3 | ||||
-rw-r--r-- | misc/py_wrap_generator.py | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/misc/launcher.c b/misc/launcher.c index 157d68cf3..e0d8208f1 100644 --- a/misc/launcher.c +++ b/misc/launcher.c @@ -61,6 +61,7 @@ SOFTWARE. */ #include <windows.h> #include <tchar.h> #include <fcntl.h> +#include <unistd.h> int child_pid=0; @@ -338,7 +339,7 @@ int run(int argc, char **argv, int is_gui) { if (is_gui) { /* Use exec, we don't need to wait for the GUI to finish */ - execv(ptr, (const char * const *)(newargs)); + execv(ptr, (char * const *)(newargs)); return fail("Could not exec %s", ptr); /* shouldn't get here! */ } diff --git a/misc/py_wrap_generator.py b/misc/py_wrap_generator.py index 48a54b643..2bf364470 100644 --- a/misc/py_wrap_generator.py +++ b/misc/py_wrap_generator.py @@ -773,6 +773,9 @@ class WClass: #if self.link_type != link_types.pointer: text += "\n\t\tstatic " + self.name + "* get_py_obj(" + long_name + "* ref)\n\t\t{" + text += "\n\t\t\tif(ref == nullptr){" + text += "\n\t\t\t\tthrow std::runtime_error(\"" + self.name + " does not exist.\");" + text += "\n\t\t\t}" text += "\n\t\t\t" + self.name + "* ret = (" + self.name + "*)malloc(sizeof(" + self.name + "));" if self.link_type == link_types.pointer: text += "\n\t\t\tret->ref_obj = ref;" |