More P64 stuff.

svn path=/trunk/; revision=27636
This commit is contained in:
Guy Harris 2009-03-07 04:47:06 +00:00
parent 76582cf2e2
commit e6ccfc6944
2 changed files with 7 additions and 6 deletions

View File

@ -97,8 +97,9 @@ void buffer_append(Buffer* buffer, guchar *from, gsize bytes)
void buffer_remove_start(Buffer* buffer, gsize bytes)
{
if (buffer->start + bytes > buffer->first_free) {
g_error("buffer_remove_start trying to remove %d bytes. s=%d ff=%d!\n",
bytes, buffer->start, buffer->first_free);
g_error("buffer_remove_start trying to remove %" G_GINT64_MODIFIER "u bytes. s=%" G_GINT64_MODIFIER "u ff=%" G_GINT64_MODIFIER "u!\n",
(guint64)bytes, (guint64)buffer->start,
(guint64)buffer->first_free);
exit(1);
}
buffer->start += bytes;

View File

@ -27,10 +27,10 @@
#define SOME_FUNCTIONS_ARE_DEFINES
typedef struct Buffer {
guchar *data;
gsize allocated;
unsigned int start;
unsigned int first_free;
guchar *data;
gsize allocated;
gsize start;
gsize first_free;
} Buffer;
void buffer_init(Buffer* buffer, gsize space);