summaryrefslogtreecommitdiff
path: root/src/input.h
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2018-07-13 10:47:25 +0800
committerAdrian Thurston <thurston@colm.net>2018-07-13 10:47:25 +0800
commit7dac7ff4de3a0ada2e57a26880752e438ccbe871 (patch)
treea9dabad507c5b45fcf17897defdb6baec441cf41 /src/input.h
parent62007044d100c310a5f293e96e9376957cb38588 (diff)
downloadcolm-7dac7ff4de3a0ada2e57a26880752e438ccbe871.tar.gz
some improvements to the (still broken) optimized append
Split up the optimized append between input struct and stream.
Diffstat (limited to 'src/input.h')
-rw-r--r--src/input.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input.h b/src/input.h
index 13435b4e..9d53b2ca 100644
--- a/src/input.h
+++ b/src/input.h
@@ -99,7 +99,7 @@ struct input_funcs \
struct colm_tree *(*undo_prepend_tree)( struct colm_program *prg, struct _input_impl *si ); \
void (*prepend_stream)( struct colm_program *prg, struct _input_impl *si, struct colm_stream *stream ); \
struct colm_tree *(*undo_prepend_stream)( struct colm_program *prg, struct _input_impl *si ); \
- void (*append_data)( struct colm_program *prg, struct _input_impl *si, const char *data, long len ); \
+ void (*append_data)( struct colm_program *prg, struct _input_impl *si, const char *data, long length ); \
struct colm_tree *(*undo_append_data)( struct colm_program *prg, struct _input_impl *si, int length ); \
void (*append_tree)( struct colm_program *prg, struct _input_impl *si, struct colm_tree *tree ); \
struct colm_tree *(*undo_append_tree)( struct colm_program *prg, struct _input_impl *si ); \
@@ -125,6 +125,8 @@ struct stream_funcs \
void (*print_tree)( struct colm_program *prg, struct colm_tree **sp, \
struct _stream_impl *impl, struct colm_tree *tree, int trim ); \
struct stream_impl *(*split_consumed)( struct colm_program *prg, struct _stream_impl *si ); \
+ int (*append_data)( struct colm_program *prg, struct _stream_impl *si, const char *data, int len ); \
+ int (*undo_append_data)( struct colm_program *prg, struct _stream_impl *si, int length ); \
void (*destructor)( struct colm_program *prg, struct colm_tree **sp, struct _stream_impl *si ); \
}