Implement our own output buffering inside saxdb.
authorMichael Poole <mdpoole@troilus.org>
Sun, 30 Mar 2008 04:00:48 +0000 (00:00 -0400)
committerMichael Poole <mdpoole@troilus.org>
Sun, 30 Mar 2008 04:00:48 +0000 (00:00 -0400)
src/saxdb.c (SAXDB_BUFFER_SIZE): Default to 32 KB if not already defined.
  (struct saxdb_context): Add "obuf" member.
  (saxdb_flush): Define new helper function.
  (saxdb_put_char): Convert to function.
  (saxdb_put_nchars): Update to use "obuf" and saxdb_flush().
  (saxdb_put_string): Update to use saxdb_put_nchars().
  (saxdb_put_qstring): Likewise.
  (saxdb_open_context): Allocate space for ctx->obuf.
  (saxdb_close_context): Flush the buffer and free ctx->obuf.


No differences found