delay memory allocation until after the first read. Saves a bunch of
authorSven Neumann <sven@gimp.org>
Thu, 10 Mar 2005 12:56:01 +0000 (12:56 +0000)
committerSven Neumann <neo@src.gnome.org>
Thu, 10 Mar 2005 12:56:01 +0000 (12:56 +0000)
commitaec8923fa6a0f9272b4eddcac508f5852f5c8483
tree3ee0f7382ed6829e6b5d3a0942be10110c78a080
parent2d7ada289845a90dc52a75d31010c87401be3334
delay memory allocation until after the first read. Saves a bunch of

2005-03-10  Sven Neumann  <sven@gimp.org>

* glib/gfileutils.c (get_contents_stdio): delay memory allocation
until after the first read. Saves a bunch of reallocs. Also
increased the buffer size to 4096 bytes. (bug #165954)

* tests/file-test.c (test_get_contents): added a (very basic) test
for g_file_get_contents().
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-8
glib/gfileutils.c
tests/.cvsignore
tests/file-test.c