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 566744 - _wrap_g_input_stream_read_async() argument parsing has incorrect keyword args
_wrap_g_input_stream_read_async() argument parsing has incorrect keyword args
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gio
Git master
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-06 09:49 UTC by James Henstridge
Modified: 2009-01-07 15:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description James Henstridge 2009-01-06 09:49:21 UTC
The positional and keyword argument lists for this wrapper don't seem to match:

 static char *kwlist[] = { "callback", "count", "io_priority",
 	"cancellable", "user_data", NULL }; 

and:

 if (!PyArg_ParseTupleAndKeywords(args, kwargs,
 	"lO|iOO:InputStream.read_async",
 	kwlist,
 	&count,
 	&notify->callback,
 	&io_priority,
 	&pycancellable,
 	&notify->data))

That is, the count and callback arguments are around the wrong way in either the kwlist or PyArg_ParseTupleAndKeywords() arguments.
Comment 1 Paul Pogonyshev 2009-01-07 15:04:10 UTC
I fixed it by swapping keywords.  First, positional arguments seem to be in similar order as in gio.OutputStream.write_async (i.e. 'callback' after the essential I/O argument), second it will not break already working code because currently you cannot use these keywords at all, but can use positional arguments.

Sending        ChangeLog
Sending        gio/ginputstream.override
Transmitting file data ..
Committed revision 994.

2009-01-07  Paul Pogonyshev  <pogonyshev@gmx.net>

	Bug 566744 – _wrap_g_input_stream_read_async() argument parsing
	has incorrect keyword args

	* gio/ginputstream.override (_wrap_g_input_stream_read_async): Fix
	keyword list to be in sync with positional arguments.