Commit 7bed56ec authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

make [declare -lib] handle absolute paths (and namespace-prefixed paths)...

make [declare -lib] handle absolute paths (and namespace-prefixed paths) consistent with object boxes
parent 04ebaffd
......@@ -1922,6 +1922,7 @@ static void canvas_stdlib(t_canvasenvironment *e, char *stdlib)
}
}
extern t_symbol *class_loadsym; /* name under which an extern is invoked */
void canvas_declare(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
{
......@@ -1948,7 +1949,13 @@ void canvas_declare(t_canvas *x, t_symbol *s, int argc, t_atom *argv)
}
else if ((argc > i+1) && !strcmp(flag, "-lib"))
{
sys_load_lib(x, atom_getsymbolarg(i+1, argc, argv)->s_name);
/* set class_loadsym in case we're loading a library by
absolute or namespace-prefixed path. Not sure yet
exactly how stdlib works so I haven't touched that
one... */
class_loadsym = atom_getsymbolarg(i+1, argc, argv);
sys_load_lib(x, class_loadsym->s_name);
class_loadsym = NULL;
i++;
}
else if ((argc > i+1) && !strcmp(flag, "-stdlib"))
......
......@@ -26,7 +26,7 @@
#define snprintf sprintf_s
#endif
static t_symbol *class_loadsym; /* name under which an extern is invoked */
t_symbol *class_loadsym; /* name under which an extern is invoked */
static void pd_defaultfloat(t_pd *x, t_float f);
static void pd_defaultblob(t_pd *x, t_blob *st); /* MP20061226 blob type */
static void pd_defaultlist(t_pd *x, t_symbol *s, int argc, t_atom *argv);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment