GNOME Bugzilla – Bug 661716
vte_terminal_feed is incorrectly annotated causing sad panda
Last modified: 2012-03-09 16:08:28 UTC
The length parameter is ending up being used in the introspecting-side code ( Python, GJS, etc ) I am told this is a bug.
Got a patch, or more info about what exactly is wrong?
What I mean is this: if you are using Vte thought introspection in say python, you have end up having to call it like this... ... term = Vte.Terminal() ... add to a window ... term.feed("Hello", 5) # I am told that the 5 should not be nessary, and that the call should end up looking like this, instead: term.feed("Hello") -------- I from what I've been told the data paramater needs an annotation that says that the length paramater is the length of the data, and then the pygobject or similar will fill in the value with the length of the string -- I can provide a full working example of it being broken if you want, but I think it should be clear from this sample snippet.
Added annotation on vte-0-32; can you check that it works now?
From cursory look at the patch, it does not seem to be right: * vte_buffer_feed: * @buffer: a #VteBuffer * @data: (allow-none): a string in the buffer's current encoding - * @length: the length of the string, or <literal>-1</literal> + * @length: (array length=data) (element-type guint8): the length of the string, or <literal>-1</literal> I think it was meant like this instead: * vte_buffer_feed: * @buffer: a #VteBuffer - * @data: (allow-none): a string in the buffer's current encoding + * @data: (allow-none) (array length=length) (element-type guint8): a string in the buffer's current encoding * @length: the length of the string, or <literal>-1</literal>
Hmm right, no idea what I was thinking ;-) Fixed on 0-32 and next.