From 6a1190792b0409e7a996400614e5e2c6ba02e5f6 Mon Sep 17 00:00:00 2001 From: Riccardo Spagni Date: Sun, 31 May 2015 16:36:48 +0200 Subject: update libunbound --- external/unbound/pythonmod/pythonmod.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'external/unbound/pythonmod/pythonmod.c') diff --git a/external/unbound/pythonmod/pythonmod.c b/external/unbound/pythonmod/pythonmod.c index 190d41a81..48dbc0169 100644 --- a/external/unbound/pythonmod/pythonmod.c +++ b/external/unbound/pythonmod/pythonmod.c @@ -133,7 +133,13 @@ int pythonmod_init(struct module_env* env, int id) /* Initialize Python libraries */ if (!Py_IsInitialized()) { - Py_SetProgramName("unbound"); +#if PY_MAJOR_VERSION >= 3 + wchar_t progname[8]; + mbstowcs(progname, "unbound", 8); +#else + char *progname = "unbound"; +#endif + Py_SetProgramName(progname); Py_NoSiteFlag = 1; Py_Initialize(); PyEval_InitThreads(); -- cgit v1.2.3