summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 19:27:19 +0100
committerwm4 <wm4@nowhere>2013-12-21 20:50:13 +0100
commitdadf3a9a46d31a101aeaa1256b0d6f914eb32f1e (patch)
treeff77fc71275281769ce559dd7e8fd9b180f02213 /options
parent3846fc758789711347c0b11f87736b27fc6210a0 (diff)
downloadmpv-dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e.tar.bz2
mpv-dadf3a9a46d31a101aeaa1256b0d6f914eb32f1e.tar.xz
m_config: add custom context to includefunc callback
Diffstat (limited to 'options')
-rw-r--r--options/m_config.c2
-rw-r--r--options/m_config.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/options/m_config.c b/options/m_config.c
index d9a3343ab7..2b873e765c 100644
--- a/options/m_config.c
+++ b/options/m_config.c
@@ -64,7 +64,7 @@ static int parse_include(struct m_config *config, struct bstr param, bool set,
if (!set)
return 1;
char *filename = bstrdup0(NULL, param);
- config->includefunc(config, filename, flags);
+ config->includefunc(config->includefunc_ctx, filename, flags);
talloc_free(filename);
return 1;
}
diff --git a/options/m_config.h b/options/m_config.h
index 1f03a9abea..829fa90ba7 100644
--- a/options/m_config.h
+++ b/options/m_config.h
@@ -61,7 +61,8 @@ typedef struct m_config {
bool use_profiles;
bool is_toplevel;
- int (*includefunc)(struct m_config *conf, char *filename, int flags);
+ int (*includefunc)(void *ctx, char *filename, int flags);
+ void *includefunc_ctx;
void *optstruct; // struct mpopts or other
} m_config_t;