[sgen] Pack structs for binary protocol entries
[mono.git] / tools / sgen / sgen-entry-stream.c
index 0e0a3c5fc251ed8c8bfbcebcb8ab76dd1f11e2d8..479f0c24574f81ae61086e043002387532fc3c96 100644 (file)
@@ -22,6 +22,14 @@ init_stream (EntryStream *stream, int file)
        stream->pos = stream->end;
 }
 
+void
+reset_stream (EntryStream *stream)
+{
+       stream->end = stream->buffer + BUFFER_SIZE;
+       stream->pos = stream->end;
+       lseek (stream->file, 0, SEEK_SET);
+}
+
 void
 close_stream (EntryStream *stream)
 {