From: fennecdjay Date: Thu, 5 Nov 2020 15:04:59 +0000 (+0100) Subject: :art: Improve plug API X-Git-Tag: nightly~1211 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=c6e6903e0ecf9876322d7867a2cc578b3f2d1ee8;p=gwion.git :art: Improve plug API --- diff --git a/include/plug.h b/include/plug.h index 57fa37dd..a2c08e7a 100644 --- a/include/plug.h +++ b/include/plug.h @@ -17,6 +17,6 @@ ANN m_bool plugin_ini(struct Gwion_ *gwion, const m_str iname); #define GWMODINI(a) ANN2(1) void* GWMODINI_NAME(const struct Gwion_ *gwion NUSED, const Vector args NUSED) #define GWMODEND(a) ANN void GWMODEND_NAME(const struct Gwion_ *gwion NUSED, void* self NUSED) #define GWDRIVER(a) ANN void GWDRIVER_NAME(DriverData* d) -#define GWDEPEND ANN m_str* GWDEPEND_NAME(void) +#define GWDEPEND ANN m_str* const GWDEPEND_NAME(void) #endif diff --git a/src/plug.c b/src/plug.c index 4104cf20..eeaceeca 100644 --- a/src/plug.c +++ b/src/plug.c @@ -157,7 +157,8 @@ ANN void plug_run(const struct Gwion_ *gwion, const Map mod) { ANN static m_bool dependencies(struct Gwion_ *gwion, const Plug plug) { const gwdeps dep = DLSYM(plug->dl, gwdeps, GWDEPEND_NAME); if(dep) { - m_str *deps = dep(); + m_str *const base = dep(); + m_str *deps = base; while(*deps) { CHECK_BB(plugin_ini(gwion, *deps)) ++deps;