Commit 4fda439d authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

add overrides for feed() and feed_child() methods which use the length of

* python/vte.override: add overrides for feed() and feed_child() methods which
	use the length of the string as given in C, to hopefully allow passing
	NUL bytes around as part of strings (bug #118711).  Make the length
	parameter optional, and ignored, to try to avoid breaking existing
	Python code in an obvious way.
parent 6673b67f
2003-08-11 nalin
* python/vte.override: add overrides for feed() and feed_child()
methods which use the length of the string as given in C, to hopefully
allow passing NUL bytes around as part of strings (bug #118711). Make
the length parameter optional, and ignored, to try to avoid breaking
existing Python code in an obvious way.
2003-08-11 nalin
* src/vte.c(vte_terminal_start_selection,vte_terminal_extend_selection):
drop an unnecessary cast-and-check, which we don't need because we have
......
......@@ -11,6 +11,44 @@ import gtk.gdk.Pixbuf as PyGdkPixbuf_Type
import gtk.MenuShell as PyGtkMenuShell_Type
import gtk.Widget as PyGtkWidget_Type
%%
override vte_terminal_feed kwargs
static PyObject *
_wrap_vte_terminal_feed(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "data", "length", NULL };
char *data;
int length;
PyObject *length_obj = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"s#|O:VteTerminal.feed",
kwlist, &data, &length, &length_obj)) {
return NULL;
}
vte_terminal_feed(VTE_TERMINAL(self->obj), data, length);
Py_INCREF(Py_None);
return Py_None;
}
%%
override vte_terminal_feed_child kwargs
static PyObject *
_wrap_vte_terminal_feed_child(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { "data", "length", NULL };
char *data;
int length;
PyObject *length_obj = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
"s#|O:VteTerminal.feed_child",
kwlist, &data, &length, &length_obj)) {
return NULL;
}
vte_terminal_feed_child(VTE_TERMINAL(self->obj), data, length);
Py_INCREF(Py_None);
return Py_None;
}
%%
override vte_terminal_fork_command kwargs
static PyObject *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment