projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
GApplication: Plug a memory leak
[platform/upstream/glib.git]
/
gio
/
ginputstream.c
diff --git
a/gio/ginputstream.c
b/gio/ginputstream.c
index
c35dd0d
..
b0dce76
100644
(file)
--- a/
gio/ginputstream.c
+++ b/
gio/ginputstream.c
@@
-13,9
+13,7
@@
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General
- * Public License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
*
* Author: Alexander Larsson <alexl@redhat.com>
*/
@@
-143,6
+141,9
@@
g_input_stream_init (GInputStream *stream)
* can happen e.g. near the end of a file. Zero is returned on end of file
* (or if @count is zero), but never otherwise.
*
* can happen e.g. near the end of a file. Zero is returned on end of file
* (or if @count is zero), but never otherwise.
*
+ * The returned @buffer is not a nul-terminated string, it can contain nul bytes
+ * at any position, and this function doesn't nul-terminate the @buffer.
+ *
* If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
* If @cancellable is not %NULL, then the operation can be cancelled by
* triggering the cancellable object from another thread. If the operation
* was cancelled, the error %G_IO_ERROR_CANCELLED will be returned. If an
@@
-151,7
+152,7
@@
g_input_stream_init (GInputStream *stream)
*
* On error -1 is returned and @error is set accordingly.
*
*
* On error -1 is returned and @error is set accordingly.
*
- * Return
value
: Number of bytes read, or -1 on error, or 0 on end of file.
+ * Return
s
: Number of bytes read, or -1 on error, or 0 on end of file.
**/
gssize
g_input_stream_read (GInputStream *stream,
**/
gssize
g_input_stream_read (GInputStream *stream,
@@
-225,7
+226,7
@@
g_input_stream_read (GInputStream *stream,
* is set to indicate the error status, @bytes_read is updated to contain
* the number of bytes read into @buffer before the error occurred.
*
* is set to indicate the error status, @bytes_read is updated to contain
* the number of bytes read into @buffer before the error occurred.
*
- * Return
value
: %TRUE on success, %FALSE if there was an error
+ * Return
s
: %TRUE on success, %FALSE if there was an error
**/
gboolean
g_input_stream_read_all (GInputStream *stream,
**/
gboolean
g_input_stream_read_all (GInputStream *stream,
@@
-296,7
+297,9
@@
g_input_stream_read_all (GInputStream *stream,
*
* On error %NULL is returned and @error is set accordingly.
*
*
* On error %NULL is returned and @error is set accordingly.
*
- * Return value: a new #GBytes, or %NULL on error
+ * Returns: a new #GBytes, or %NULL on error
+ *
+ * Since: 2.34
**/
GBytes *
g_input_stream_read_bytes (GInputStream *stream,
**/
GBytes *
g_input_stream_read_bytes (GInputStream *stream,
@@
-345,7
+348,7
@@
g_input_stream_read_bytes (GInputStream *stream,
* operation was partially finished when the operation was cancelled the
* partial result will be returned, without an error.
*
* operation was partially finished when the operation was cancelled the
* partial result will be returned, without an error.
*
- * Return
value
: Number of bytes skipped, or -1 on error
+ * Return
s
: Number of bytes skipped, or -1 on error
**/
gssize
g_input_stream_skip (GInputStream *stream,
**/
gssize
g_input_stream_skip (GInputStream *stream,
@@
-470,7
+473,7
@@
g_input_stream_real_skip (GInputStream *stream,
* Cancelling a close will still leave the stream closed, but some streams
* can use a faster close that doesn't block to e.g. check errors.
*
* Cancelling a close will still leave the stream closed, but some streams
* can use a faster close that doesn't block to e.g. check errors.
*
- * Return
value
: %TRUE on success, %FALSE on failure
+ * Return
s
: %TRUE on success, %FALSE on failure
**/
gboolean
g_input_stream_close (GInputStream *stream,
**/
gboolean
g_input_stream_close (GInputStream *stream,
@@
-541,7
+544,7
@@
async_ready_close_callback_wrapper (GObject *source_object,
* @buffer: (array length=count) (element-type guint8): a buffer to
* read data into (which should be at least count bytes long).
* @count: the number of bytes that will be read from the stream
* @buffer: (array length=count) (element-type guint8): a buffer to
* read data into (which should be at least count bytes long).
* @count: the number of bytes that will be read from the stream
- * @io_priority: the
<link linkend="io-priority">I/O priority</link>
+ * @io_priority: the
[I/O priority][io-priority]
* of the request.
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* of the request.
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
@@
-688,8
+691,7
@@
read_bytes_callback (GObject *stream,
* g_input_stream_read_bytes_async:
* @stream: A #GInputStream.
* @count: the number of bytes that will be read from the stream
* g_input_stream_read_bytes_async:
* @stream: A #GInputStream.
* @count: the number of bytes that will be read from the stream
- * @io_priority: the <link linkend="io-priority">I/O priority</link>
- * of the request.
+ * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
@@
-714,6
+716,8
@@
read_bytes_callback (GObject *stream,
* Any outstanding I/O request with higher priority (lower numerical
* value) will be executed before an outstanding request with lower
* priority. Default priority is %G_PRIORITY_DEFAULT.
* Any outstanding I/O request with higher priority (lower numerical
* value) will be executed before an outstanding request with lower
* priority. Default priority is %G_PRIORITY_DEFAULT.
+ *
+ * Since: 2.34
**/
void
g_input_stream_read_bytes_async (GInputStream *stream,
**/
void
g_input_stream_read_bytes_async (GInputStream *stream,
@@
-745,6
+749,8
@@
g_input_stream_read_bytes_async (GInputStream *stream,
* Finishes an asynchronous stream read-into-#GBytes operation.
*
* Returns: the newly-allocated #GBytes, or %NULL on error
* Finishes an asynchronous stream read-into-#GBytes operation.
*
* Returns: the newly-allocated #GBytes, or %NULL on error
+ *
+ * Since: 2.34
**/
GBytes *
g_input_stream_read_bytes_finish (GInputStream *stream,
**/
GBytes *
g_input_stream_read_bytes_finish (GInputStream *stream,
@@
-761,8
+767,7
@@
g_input_stream_read_bytes_finish (GInputStream *stream,
* g_input_stream_skip_async:
* @stream: A #GInputStream.
* @count: the number of bytes that will be skipped from the stream
* g_input_stream_skip_async:
* @stream: A #GInputStream.
* @count: the number of bytes that will be skipped from the stream
- * @io_priority: the <link linkend="io-priority">I/O priority</link>
- * of the request.
+ * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore.
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
@@
-873,8
+878,7
@@
g_input_stream_skip_finish (GInputStream *stream,
/**
* g_input_stream_close_async:
* @stream: A #GInputStream.
/**
* g_input_stream_close_async:
* @stream: A #GInputStream.
- * @io_priority: the <link linkend="io-priority">I/O priority</link>
- * of the request.
+ * @io_priority: the [I/O priority][io-priority] of the request
* @cancellable: (allow-none): optional cancellable object
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
* @cancellable: (allow-none): optional cancellable object
* @callback: (scope async): callback to call when the request is satisfied
* @user_data: (closure): the data to pass to callback function
@@
-1000,7
+1004,7
@@
g_input_stream_has_pending (GInputStream *stream)
* already set or @stream is closed, it will return %FALSE and set
* @error.
*
* already set or @stream is closed, it will return %FALSE and set
* @error.
*
- * Return
value
: %TRUE if pending was previously unset and is now set.
+ * Return
s
: %TRUE if pending was previously unset and is now set.
**/
gboolean
g_input_stream_set_pending (GInputStream *stream, GError **error)
**/
gboolean
g_input_stream_set_pending (GInputStream *stream, GError **error)