New functions for efficient access to buffer and simple single byte reads.

2007-11-27  Juerg Billeter  <j@bitron.ch>

	* gbufferedinputstream.c: (g_buffered_input_stream_peek_buffer),
	(g_buffered_input_stream_read_byte):
	* gbufferedinputstream.h:
	New functions for efficient access to buffer and simple single byte
	reads.

	* gdatainputstream.c: (scan_for_newline), (scan_for_chars),
	(g_data_input_stream_read_until):
	* gdatainputstream.h:
	Use peek_buffer to avoid memcpy in scan_for_newline, implement
	read_until with multiple stop chars.

svn path=/trunk/; revision=5952
This commit is contained in:
Juerg Billeter
2007-11-27 13:44:48 +00:00
committed by Jürg Billeter
parent 2490a699be
commit 6d071b4ab6
5 changed files with 279 additions and 65 deletions

View File

@@ -107,7 +107,7 @@ char * g_data_input_stream_read_line (GDataInputStream
GCancellable *cancellable,
GError **error);
char * g_data_input_stream_read_until (GDataInputStream *stream,
gchar stop_char,
const gchar *stop_chars,
gsize *length,
GCancellable *cancellable,
GError **error);