1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Compilation fixes

This commit is contained in:
2006-01-28 20:54:11 +01:00
parent 645689f1aa
commit 669d4af154
3 changed files with 7 additions and 5 deletions

View File

@ -17,6 +17,8 @@
#include "util/file.h" #include "util/file.h"
#include "util/string.h" #include "util/string.h"
#include <Python.h>
PyObject *pDict, *pModule; PyObject *pDict, *pModule;
void void

View File

@ -2,12 +2,8 @@
#ifndef EL__SCRIPTING_PYTHON_CORE_H #ifndef EL__SCRIPTING_PYTHON_CORE_H
#define EL__SCRIPTING_PYTHON_CORE_H #define EL__SCRIPTING_PYTHON_CORE_H
#include <Python.h>
struct module; struct module;
extern PyObject *pDict, *pModule;
void init_python(struct module *module); void init_python(struct module *module);
void cleanup_python(struct module *module); void cleanup_python(struct module *module);

View File

@ -16,9 +16,13 @@
#include "session/session.h" #include "session/session.h"
#include "util/string.h" #include "util/string.h"
#include <Python.h>
/* The events that will trigger the functions below and what they are expected /* The events that will trigger the functions below and what they are expected
* to do is explained in doc/events.txt */ * to do is explained in doc/events.txt */
extern PyObject *pDict, *pModule;
static void static void
do_script_hook_goto_url(struct session *ses, unsigned char **url) 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) { if (str) {
int len = PyString_Size(pValue); /* strlen(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); normalize_cache_entry(cached, len);
} }
Py_DECREF(pValue); Py_DECREF(pValue);