After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 661716 - vte_terminal_feed is incorrectly annotated causing sad panda
vte_terminal_feed is incorrectly annotated causing sad panda
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: VTE Maintainers
VTE Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-10-13 21:19 UTC by Amanda Cameron
Modified: 2012-03-09 16:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Amanda Cameron 2011-10-13 21:19:37 UTC
The length parameter is ending up being used in the introspecting-side code ( Python, GJS, etc )
I am told this is a bug.
Comment 1 Christian Persch 2011-10-16 16:42:04 UTC
Got a patch, or more info about what exactly is wrong?
Comment 2 Amanda Cameron 2011-10-16 17:21:56 UTC
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.
Comment 3 Christian Persch 2012-03-08 20:39:43 UTC
Added annotation on vte-0-32; can you check that it works now?
Comment 4 Pavel Holejsovsky 2012-03-09 09:42:40 UTC
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>
Comment 5 Christian Persch 2012-03-09 16:08:28 UTC
Hmm right, no idea what I was thinking ;-) Fixed on 0-32 and next.