mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[python] compilation fixes
This commit is contained in:
parent
d074c58111
commit
386a0f956f
@ -5,11 +5,13 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
#include <osdefs.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "config/home.h"
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "bfu/inpfield.h"
|
||||
@ -112,7 +114,7 @@ struct python_input_callback_hop {
|
||||
static void
|
||||
invoke_input_ok_callback(void *data, char *text)
|
||||
{
|
||||
struct python_input_callback_hop *hop = data;
|
||||
struct python_input_callback_hop *hop = (struct python_input_callback_hop *)data;
|
||||
struct session *saved_python_ses = python_ses;
|
||||
PyObject *result;
|
||||
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "cache/cache.h"
|
||||
@ -29,7 +31,7 @@ python_current_document(PyObject *self, PyObject *args)
|
||||
if (python_ses && python_ses->doc_view
|
||||
&& python_ses->doc_view->document) {
|
||||
struct cache_entry *cached = python_ses->doc_view->document->cached;
|
||||
struct fragment *f = cached ? cached->frag.next : NULL;
|
||||
struct fragment *f = (struct fragment *)(cached ? cached->frag.next : NULL);
|
||||
|
||||
if (f) return PyUnicode_FromStringAndSize(f->data, f->length);
|
||||
}
|
||||
|
@ -5,12 +5,14 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#include <iconv.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "cache/cache.h"
|
||||
@ -57,7 +59,7 @@ script_hook_url(va_list ap, void *data)
|
||||
{
|
||||
char **url = va_arg(ap, char **);
|
||||
struct session *ses = va_arg(ap, struct session *);
|
||||
char *method = data;
|
||||
char *method = (char *)data;
|
||||
struct session *saved_python_ses = python_ses;
|
||||
PyObject *result;
|
||||
|
||||
|
@ -5,11 +5,13 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "config/kbdbind.h"
|
||||
@ -28,7 +30,7 @@ PyObject *keybindings = NULL;
|
||||
static enum evhook_status
|
||||
invoke_keybinding_callback(va_list ap, void *data)
|
||||
{
|
||||
PyObject *callback = data;
|
||||
PyObject *callback = (PyObject *)data;
|
||||
struct session *saved_python_ses = python_ses;
|
||||
PyObject *result;
|
||||
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "cache/cache.h"
|
||||
@ -32,7 +34,7 @@ struct python_load_uri_callback_hop {
|
||||
static void
|
||||
invoke_load_uri_callback(struct download *download, void *data)
|
||||
{
|
||||
struct python_load_uri_callback_hop *hop = data;
|
||||
struct python_load_uri_callback_hop *hop = (struct python_load_uri_callback_hop *)data;
|
||||
struct session *saved_python_ses = python_ses;
|
||||
|
||||
assert(download);
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "bfu/menu.h"
|
||||
@ -28,11 +30,11 @@
|
||||
static void
|
||||
invoke_menu_callback(struct terminal *term, void *data, void *ses)
|
||||
{
|
||||
PyObject *callback = data;
|
||||
PyObject *callback = (PyObject *)data;
|
||||
struct session *saved_python_ses = python_ses;
|
||||
PyObject *result;
|
||||
|
||||
python_ses = ses;
|
||||
python_ses = (struct session *)ses;
|
||||
|
||||
result = PyObject_CallFunction(callback, NULL);
|
||||
if (result)
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "intl/libintl.h"
|
||||
|
@ -5,8 +5,10 @@
|
||||
#endif
|
||||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#undef HAVE_TERM_H
|
||||
#include <Python.h>
|
||||
|
||||
#undef HAVE_TERM_H
|
||||
#include "elinks.h"
|
||||
|
||||
#include "intl/libintl.h"
|
||||
|
Loading…
Reference in New Issue
Block a user