diff --git a/src/scripting/python/core.c b/src/scripting/python/core.c index 43d058cd2..5e08016e3 100644 --- a/src/scripting/python/core.c +++ b/src/scripting/python/core.c @@ -17,6 +17,8 @@ #include "util/file.h" #include "util/string.h" +#include + PyObject *pDict, *pModule; void diff --git a/src/scripting/python/core.h b/src/scripting/python/core.h index 20d4d7f06..00b08deed 100644 --- a/src/scripting/python/core.h +++ b/src/scripting/python/core.h @@ -2,12 +2,8 @@ #ifndef EL__SCRIPTING_PYTHON_CORE_H #define EL__SCRIPTING_PYTHON_CORE_H -#include - struct module; -extern PyObject *pDict, *pModule; - void init_python(struct module *module); void cleanup_python(struct module *module); diff --git a/src/scripting/python/hooks.c b/src/scripting/python/hooks.c index 53427f5d9..6a92ffdf9 100644 --- a/src/scripting/python/hooks.c +++ b/src/scripting/python/hooks.c @@ -16,9 +16,13 @@ #include "session/session.h" #include "util/string.h" +#include + /* The events that will trigger the functions below and what they are expected * to do is explained in doc/events.txt */ +extern PyObject *pDict, *pModule; + static void do_script_hook_goto_url(struct session *ses, unsigned char **url) { @@ -117,7 +121,7 @@ do_script_hook_pre_format_html(unsigned char *url, struct cache_entry *cached, if (str) { int len = PyString_Size(pValue); /* strlen(str); */ - add_fragment(cached, 0, (unsigned char *) str, len); + add_fragment(cached, 0, str, len); normalize_cache_entry(cached, len); } Py_DECREF(pValue);