summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: efc749b)
raw | patch | inline | side by side (parent: efc749b)
author | Jonathan Nieder <jrnieder@gmail.com> | |
Mon, 11 Oct 2010 02:46:24 +0000 (21:46 -0500) | ||
committer | Jonathan Nieder <jrnieder@gmail.com> | |
Tue, 22 Mar 2011 21:32:09 +0000 (16:32 -0500) |
Move from uint32_t to off_t as the fundamental unit of length used by
the line_buffer library. Performance would get worse if anything but
I think it's worth it for support of deltas that need to skip large
pieces (> 4 GiB).
Exception: buffer_read_string still takes a uint32_t, since it keeps
its result in an in-core obj_pool.
Callers still have to be updated to take advantage of this.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
the line_buffer library. Performance would get worse if anything but
I think it's worth it for support of deltas that need to skip large
pieces (> 4 GiB).
Exception: buffer_read_string still takes a uint32_t, since it keeps
its result in an in-core obj_pool.
Callers still have to be updated to take advantage of this.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
vcs-svn/line_buffer.c | patch | blob | history | |
vcs-svn/line_buffer.h | patch | blob | history |
diff --git a/vcs-svn/line_buffer.c b/vcs-svn/line_buffer.c
index eb8a6a7f7b67fb56f28f42e39b92736f91b0af85..747de07e6b4608d9d1ec68c9dc41d89aec552330 100644 (file)
--- a/vcs-svn/line_buffer.c
+++ b/vcs-svn/line_buffer.c
strbuf_fread(sb, size, buf->infile);
}
-void buffer_copy_bytes(struct line_buffer *buf, uint32_t len)
+void buffer_copy_bytes(struct line_buffer *buf, off_t len)
{
char byte_buffer[COPY_BUFFER_LEN];
uint32_t in;
}
}
-void buffer_skip_bytes(struct line_buffer *buf, uint32_t len)
+void buffer_skip_bytes(struct line_buffer *buf, off_t len)
{
char byte_buffer[COPY_BUFFER_LEN];
uint32_t in;
diff --git a/vcs-svn/line_buffer.h b/vcs-svn/line_buffer.h
index 3c9629e09d3442acb1216754cdc4721ffba89c1b..a090dd6874ebae4c2a46da32c62260159f210a62 100644 (file)
--- a/vcs-svn/line_buffer.h
+++ b/vcs-svn/line_buffer.h
char *buffer_read_string(struct line_buffer *buf, uint32_t len);
int buffer_read_char(struct line_buffer *buf);
void buffer_read_binary(struct line_buffer *buf, struct strbuf *sb, uint32_t len);
-void buffer_copy_bytes(struct line_buffer *buf, uint32_t len);
-void buffer_skip_bytes(struct line_buffer *buf, uint32_t len);
+void buffer_copy_bytes(struct line_buffer *buf, off_t len);
+void buffer_skip_bytes(struct line_buffer *buf, off_t len);
#endif