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 547354 - wrap a few memory stream methods
wrap a few memory stream methods
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: gio
Git master
Other All
: Normal enhancement
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-11 22:01 UTC by Paul Pogonyshev
Modified: 2008-08-11 22:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch implementing the methods (4.04 KB, patch)
2008-08-11 22:01 UTC, Paul Pogonyshev
committed Details | Review

Description Paul Pogonyshev 2008-08-11 22:01:17 UTC
Currently the memory streams are not usable.  To become usable we need:
- gio.MemoryInputStream.add_data
- gio.MemoryOutputStream.__init__
- gio.MemoryOutputStream.get_data

Since get_data conflicts with gobject.GObject.get_data, it gets renamed to get_contents instead.  Patch follows.
Comment 1 Paul Pogonyshev 2008-08-11 22:01:44 UTC
Created attachment 116389 [details] [review]
patch implementing the methods
Comment 2 Paul Pogonyshev 2008-08-11 22:05:34 UTC
Sending        ChangeLog
Sending        gio/ginputstream.override
Sending        gio/gio.defs
Sending        gio/goutputstream.override
Sending        tests/test_gio.py
Transmitting file data .....
Committed revision 944.

2008-08-12  Paul Pogonyshev  <pogonyshev@gmx.net>

	Bug 547354 – wrap a few memory stream methods

	* gio/ginputstream.override (_wrap_g_memory_input_stream_add_data):
	New function.

	* gio/gio.defs (gio.MemoryOutputStream.get_contents): Rename from
	get_data() to avoid name clash.

	* gio/goutputstream.override (_wrap_g_memory_output_stream_new)
	(_wrap_g_memory_output_stream_get_data): New functions.

	* tests/test_gio.py (TestMemoryInputStream)
	(TestMemoryOutputStream): New test cases.