aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends/lua.c
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-11 23:20:34 +0100
committercbdev <cb@cbcdn.com>2019-12-11 23:20:34 +0100
commitf6d6eefe9bb9934f4fa3e665734d746f02471cdb (patch)
tree4f177149cd7a39ba0214b0edf337362c7ead3234 /backends/lua.c
parentf65fb8baaba285f5ff4b02af111420ba4479f5d9 (diff)
downloadmidimonster-f6d6eefe9bb9934f4fa3e665734d746f02471cdb.tar.gz
midimonster-f6d6eefe9bb9934f4fa3e665734d746f02471cdb.tar.bz2
midimonster-f6d6eefe9bb9934f4fa3e665734d746f02471cdb.zip
Simplify plugin_stop API
Diffstat (limited to 'backends/lua.c')
-rw-r--r--backends/lua.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/backends/lua.c b/backends/lua.c
index b165dd8..2ce40f5 100644
--- a/backends/lua.c
+++ b/backends/lua.c
@@ -460,17 +460,10 @@ static int lua_start(size_t n, instance** inst){
return 0;
}
-static int lua_shutdown(){
- size_t n, u, p;
- instance** inst = NULL;
+static int lua_shutdown(size_t n, instance** inst){
+ size_t u, p;
lua_instance_data* data = NULL;
- //fetch all instances
- if(mm_backend_instances(BACKEND_NAME, &n, &inst)){
- fprintf(stderr, "Failed to fetch instance list\n");
- return 1;
- }
-
for(u = 0; u < n; u++){
data = (lua_instance_data*) inst[u]->impl;
//stop the interpreter
@@ -486,7 +479,6 @@ static int lua_shutdown(){
free(inst[u]->impl);
}
- free(inst);
//free module-global data
free(timer);
timer = NULL;