Skip to content
Snippets Groups Projects
Commit 0ab3fc38 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

modffi: Support open own executable using open(None).

parent 50149a57
No related branches found
No related tags found
No related merge requests found
......@@ -272,7 +272,10 @@ STATIC mp_obj_t ffimod_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_
(void)n_args;
(void)n_kw;
const char *fname = mp_obj_str_get_str(args[0]);
const char *fname = NULL;
if (args[0] != mp_const_none) {
fname = mp_obj_str_get_str(args[0]);
}
void *mod = dlopen(fname, RTLD_NOW | RTLD_LOCAL);
if (mod == NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment