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

[python] static char[]

This commit is contained in:
Witold Filipczyk 2022-01-30 18:48:53 +01:00
parent 21f0b54eb3
commit f56e4f09f3
4 changed files with 29 additions and 5 deletions

View File

@ -44,7 +44,11 @@ python_info_box(PyObject *self, PyObject *args, PyObject *kwargs)
char *title = N_("Info");
PyObject *object, *string_object;
char *text;
static char *kwlist[] = {"text", "title", NULL};
static char s_text[] = "text";
static char s_title[] = "title";
static char *kwlist[] = {s_text, s_title, NULL};
if (!python_ses) {
PyErr_SetString(python_elinks_err, "No session");
@ -172,7 +176,13 @@ python_input_box(PyObject *self, PyObject *args, PyObject *kwargs)
char *title = N_("User dialog");
char *initial = NULL;
struct python_input_callback_hop *hop;
static char *kwlist[] = {"prompt", "callback", "title", "initial", NULL};
static char s_prompt[] = "prompt";
static char s_callback[] = "callback";
static char s_title[] = "title";
static char s_initial[] = "initial";
static char *kwlist[] = {s_prompt, s_callback, s_title, s_initial, NULL};
if (!python_ses) {
PyErr_SetString(python_elinks_err, "No session");

View File

@ -88,7 +88,12 @@ python_bind_key(PyObject *self, PyObject *args, PyObject *kwargs)
struct string event_name;
int event_id;
char *error_msg;
static char *kwlist[] = {"keystroke", "callback", "keymap", NULL};
static char s_keystroke[] = "keystroke";
static char s_callback[] = "callback";
static char s_keymap[] = "keymap";
static char *kwlist[] = {s_keystroke, s_callback, s_keymap, NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO|s:bind_key", kwlist,
&keystroke, &callback, &keymap))

View File

@ -77,7 +77,11 @@ python_menu(PyObject *self, PyObject *args, PyObject *kwargs)
int i;
struct menu_item *menu;
struct memory_list *ml = NULL;
static char *kwlist[] = {"items", "type", NULL};
static char s_items[] = "items";
static char s_type[] = "type";
static char *kwlist[] = {s_items, s_type, NULL};
if (!python_ses) {
PyErr_SetString(python_elinks_err, "No session");

View File

@ -43,7 +43,12 @@ python_open(PyObject *self, PyObject *args, PyObject *kwargs)
char *url;
int new_tab = 0, background = 0;
struct uri *uri;
static char *kwlist[] = {"url", "new_tab", "background", NULL};
static char s_url[] = "url";
static char s_new_tab[] = "new_tab";
static char s_background[] = "background";
static char *kwlist[] = {s_url, s_new_tab, s_background, NULL};
if (!python_ses) {
PyErr_SetString(python_elinks_err, "No session");