summaryrefslogtreecommitdiffstats
path: root/gio/ginputstream.override
Commit message (Collapse)AuthorAgeFilesLines
* Use _PyUnicode or _PyByteArray macrosJohn Ehresman2010-04-151-10/+10
|
* Cleanup GIO overrides to use Python function/method namesPaul Pogonyshev2009-06-121-1/+1
| | | | | Also move several gio.Mount overrides over from 'gio.override' to existing 'gmount.override'. Part of bug #584289.
* Wrap gio.memory_input_stream_new_from_dataGian Mario Tagliaretti2009-06-091-34/+0
| | | | | Add the wrapper for gio.memory_input_stream_new_from_data including docs and a test.
* Wrap gio.DataInputStream.read_line_async and read_until_asyncPaul Pogonyshev2009-05-311-65/+0
| | | | | | | Wrap the functions and their corresponding *_finish() functions. Create 'gdatainputstream.override' for these and move two existing functions there. Add unit tests. Re-enable synchronous read_line unit test and adjust it for new official GIO behavior. Bug #584285.
* Fix a bug in InputStream.skip_asyncGian Mario Tagliaretti2009-05-091-1/+2
| | | | use the count argument instead of buffer_size which is always zero
* Wrap gio.InputStream.skip_async()Gian Mario Tagliaretti2009-05-051-1/+49
| | | | wrap gio.InputStream.skip_async() and add a test.
* Update the address of the FSF, by replacing old bits of the address withTobias Mueller2009-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-03-29 Tobias Mueller <tobiasmue@gnome.org> Update the address of the FSF, by replacing old bits of the address with new ones. Fixes bug 577134 * ltihooks.py: * pygtk.py: * COPYING: * gobject/pygparamspec.h: * gobject/pygpointer.c: * gobject/ffi-marshaller.h: * gobject/pygtype.c: * gobject/__init__.py: * gobject/pygpointer.h: * gobject/pygtype.h: * gobject/pygflags.c: * gobject/pyginterface.c: * gobject/pygflags.h: * gobject/pygboxed.c: * gobject/gobjectmodule.c: * gobject/pygenum.c: * gobject/pyginterface.h: * gobject/pygboxed.h: * gobject/pygobject.c: * gobject/constants.py.in: * gobject/pygenum.h: * gobject/propertyhelper.py: * gobject/pygparamspec.c: * gobject/ffi-marshaller.c: * glib/pygmainloop.c: * glib/pygoptioncontext.h: * glib/pygmainloop.h: * glib/pyglib-private.h: * glib/__init__.py: * glib/pygoptiongroup.c: * glib/pygspawn.c: * glib/pygmaincontext.c: * glib/pygoptiongroup.h: * glib/pygspawn.h: * glib/pygmaincontext.h: * glib/option.py: * glib/pygsource.c: * glib/glibmodule.c: * glib/pygiochannel.h: * glib/pygsource.h: * glib/pyglib.c: * glib/pyglib.h: * glib/pyglib-python-compat.h: * glib/pygoptioncontext.c: * gio/gfileinfo.override: * gio/gappinfo.override: * gio/__init__.py: * gio/gfileattribute.override: * gio/gvolume.override: * gio/gio.override: * gio/ginputstream.override: * gio/goutputstream.override: * gio/unix.override: * gio/gfile.override: * gio/gvolumemonitor.override: * gio/gapplaunchcontext.override: * gio/giomodule.c: * gio/gfileenumerator.override: * gio/pygio-utils.c: * gio/unixmodule.c: * gio/pygio-utils.h: * gio/gicon.override: svn path=/trunk/; revision=1038
* Bug 567792 – gio.InputStream.read_async can cause memory corruptionPaul Pogonyshev2009-01-291-79/+21
| | | | | | | | | | | | | | | | | | | | | | | 2009-01-29 Paul Pogonyshev <pogonyshev@gmx.net> Bug 567792 – gio.InputStream.read_async can cause memory corruption * gio/gio.override (py_decref_callback): Remove (unused now). (pygio_notify_allocate_buffer, pygio_notify_attach_to_result) (pygio_notify_get_attached): New functions. (async_result_callback_marshal): Attach to the result object if asked and then don't free self. Fix reference leak (spotted by Gustavo). * gio/ginputstream.override (async_result_callback_marshal_read): Remove. Use new attachment functionality in async_result_callback_marshal() instead. (_wrap_g_input_stream_read_async): Use the new functions (also those mentioned in the cleanup log below). (_wrap_g_input_stream_read_finish): Use the new functions. svn path=/trunk/; revision=999
* Bug 566706 – cleanup GIO overridesPaul Pogonyshev2009-01-141-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2009-01-14 Paul Pogonyshev <pogonyshev@gmx.net> Bug 566706 – cleanup GIO overrides * gio/gio.override (pygio_notify_new) (pygio_notify_using_optional_callback) (pygio_notify_callback_is_valid_full) (pygio_notify_callback_is_valid) (pygio_notify_reference_callback): New functions. (pygio_notify_free): Rename from pygio_free_notify() and extend. (async_result_callback_marshal): Warn if new `referenced' field is not set (programming error). (_wrap_g_drive_eject, _wrap_g_drive_poll_for_media) (_wrap_g_mount_unmount, _wrap_g_mount_eject) (_wrap_g_mount_remount): Lots of cleanup: use new functions instead of repeating code, unify and fix error handling. * gio/gfile.override (_wrap_g_file_read_async) (_wrap_g_file_load_contents_async) (_wrap_g_file_enumerate_children_async) (_wrap_g_file_mount_mountable, _wrap_g_file_unmount_mountable) (_wrap_g_file_mount_enclosing_volume, _wrap_g_file_copy) (_wrap_g_file_copy_async, _wrap_g_file_move) (_wrap_g_file_append_to_async, _wrap_g_file_create_async) (_wrap_g_file_replace_async, _wrap_g_file_query_info_async) (_wrap_g_file_replace_contents_async): Similar cleanup. * gio/gfileenumerator.override (_wrap_g_file_enumerator_next_files_async): Similar cleanup. * gio/gicon.override (_wrap_g_loadable_icon_load_async): Similar cleanup. * gio/ginputstream.override (_wrap_g_input_stream_close_async): Similar cleanup. * gio/goutputstream.override (_wrap_g_output_stream_write_async) (_wrap_g_output_stream_close_async): Similar cleanup. * gio/gvolume.override (_wrap_g_volume_mount) (_wrap_g_volume_eject): Similar cleanup. * tests/test_gio.py (TestFile.test_copy_async): Fix the test. svn path=/trunk/; revision=996
* Bug 566744 – _wrap_g_input_stream_read_async() argument parsing hasPaul Pogonyshev2009-01-071-1/+1
| | | | | | | | | | | | 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. svn path=/trunk/; revision=994
* Rename from read(), document. (gio.InputStream.read): Rename fromPaul Pogonyshev2008-08-271-21/+88
| | | | | | | | | | | | | | | | | | | | | | | | 2008-08-28 Paul Pogonyshev <pogonyshev@gmx.net> * gio/gio.defs (gio.InputStream.read_part): Rename from read(), document. (gio.InputStream.read): Rename from read_all(), document. (gio.OutputStream.write_part): Rename from write(), document. (gio.OutputStream.write): Rename from write_all(), document. * gio/ginputstream.override (_wrap_g_input_stream_read): Fix several bugs. (_wrap_g_input_stream_read_all): New function. * gio/goutputstream.override (_wrap_g_output_stream_write_all): New function. * tests/test_gio.py (TestInputStream.testRead): Add more tests. (TestInputStream.test_read_part): New test. (TestInputStream._read_in_loop): New helper method. (TestOutputStream.test_write_part): New test. svn path=/trunk/; revision=950
* Bug 547484 – wrap gio.DataInputStream.read_line and ...read_untilPaul Pogonyshev2008-08-121-0/+65
| | | | | | | | | | | | | 2008-08-12 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547484 – wrap gio.DataInputStream.read_line and ...read_until * tests/test_gio.py (TestDataInputStream): New test case. * gio/ginputstream.override (_wrap_g_data_input_stream_read_line) (_wrap_g_data_input_stream_read_until): New functions. svn path=/trunk/; revision=946
* only use 4 spaces in indentGian Mario Tagliaretti2008-08-121-202/+202
| | | | svn path=/trunk/; revision=945
* Bug 547354 – wrap a few memory stream methodsPaul Pogonyshev2008-08-111-0/+34
| | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=944
* Add a new exampleJohan Dahlin2008-07-281-9/+12
| | | | | | | | | | | | | | | 2008-07-29 Johan Dahlin <johan@gnome.org> * examples/gio/downloader.py: Add a new example * gio/ginputstream.override: Use a string internally instead of a PyStringObject when in read_async. Create a new python string in finish and honor the number of bytes read. svn path=/trunk/; revision=892
* Wrap gio.File.copy, add tests and documentation. RenameJohan Dahlin2008-07-241-11/+11
| | | | | | | | | | | | | | | | | 2008-07-24 Johan Dahlin <johan@gnome.org> * gio/gfile.override: * gio/gfileenumerator.override: * gio/ginputstream.override: * gio/gio.defs: * gio/gio.override: * gio/goutputstream.override: * tests/test_gio.py: Wrap gio.File.copy, add tests and documentation. Rename PyGAsyncRequestNotify to PyGIONotify and reuse it. svn path=/trunk/; revision=850
* Map GSeekType to an intJohan Dahlin2008-07-141-0/+2
| | | | | | | | | | | | | | | 2008-07-14 Johan Dahlin <johan@gnome.org> * codegen/argtypes.py: Map GSeekType to an int * gio/gfileinfo.override: * gio/ginputstream.override: * gio/goutputstream.override: Add comments for missing API svn path=/trunk/; revision=798
* Refactor cancellable check to a utility function, avoidsJohan Dahlin2008-07-141-35/+9
| | | | | | | | | | | | | | | | 2008-07-14 Johan Dahlin <johan@gnome.org> * gio/Makefile.am: * gio/gfile.override: * gio/ginputstream.override: * gio/gio.override: * gio/goutputstream.override: * gio/pygio-utils.c (pygio_check_cancellable): * gio/pygio-utils.h: Refactor cancellable check to a utility function, avoids svn path=/trunk/; revision=797
* Move around the order of the callback argument to async methods, so itJohan Dahlin2008-04-111-39/+59
| | | | | | | | | | | | | | | 2008-04-11 Johan Dahlin <jdahlin@async.com.br> * gio/gfile.override: * gio/ginputstream.override: * gio/goutputstream.override: * tests/test_gio.py: Move around the order of the callback argument to async methods, so it comes before priority and cancellable, which can have default values. svn path=/trunk/; revision=773
* Add wrappers.Johan Dahlin2008-04-061-0/+54
| | | | | | | | | | | | 2008-04-06 Johan Dahlin <johan@gnome.org> * gio/goutputstream.override: (_wrap_g_output_stream_write_asyn,_wrap_g_output_stream_close_async): * gio/ginputstream.override (async_result_callback_marshal_read): Add wrappers. svn path=/trunk/; revision=761
* Fix the buildJohan Dahlin2008-03-221-9/+3
| | | | svn path=/trunk/; revision=754
* Make read_finish() return the string, remove the get_buffer method. ThisJohan Dahlin2008-03-221-5/+92
| | | | | | | | | | | | | | | | 2008-03-22 Johan Dahlin <johan@gnome.org> * gio/ginputstream.override: * gio/gio.override: * tests/test_gio.py: Make read_finish() return the string, remove the get_buffer method. This is more pythonic, as it mimics the normal read() behavior of python. Update the tests and use a separate marshaller for read. svn path=/trunk/; revision=753
* Pass in l instead of i to PyArg_ParseTupleAndKeywords when parsing a long.Johan Dahlin2008-03-081-2/+2
| | | | | | | | | | | | 2008-03-08 Johan Dahlin <jdahlin@async.com.br> * gio/ginputstream.override: Pass in l instead of i to PyArg_ParseTupleAndKeywords when parsing a long. Fixes the build on 64-bit systems. (#521165, Thomas Leonard) svn path=/trunk/; revision=749
* Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF.Johan Dahlin2008-01-211-1/+1
| | | | | | | | | | | | | | | | | | | | 2008-01-21 Johan Dahlin <johan@gnome.org> * gio/gio.override (async_result_callback_marshal): Don't assume the buffer is set, use Py_XINCREF instead of Py_INCREF. * gio/Makefile.am: * gio/ginputstream.override: * gio/goutputstream.override: * gio/gvolumemonitor.override: * gio/gfile.override: * tests/test_gio.py: Implement and test GFile.read_async. Use try/finally to always quit the mainloop, even if the test fail. Update source comment headers. svn path=/trunk/; revision=744
* Split out overrides into more files. Fix up module description in commentJohan Dahlin2008-01-201-0/+155
2008-01-20 Johan Dahlin <johan@gnome.org> * gio/Makefile.am: * gio/ginputstream.override: * gio/gio.override: * gio/giomodule.c: * gio/goutputstream.override: * gio/gvolumemonitor.override: * gio/unix.override: * gio/unixmodule.c: Split out overrides into more files. Fix up module description in comment svn path=/trunk/; revision=741