Replace 22 lousy C casts with just 3
[sbcl.git] / src / runtime / var-io.h
blob2ea8db738e034193138fa6291cee9f8270b3dd49
1 /*
2 * This software is part of the SBCL system. See the README file for
3 * more information.
5 * This software is derived from the CMU CL system, which was
6 * written at Carnegie Mellon University and released into the
7 * public domain. The software is in the public domain and is
8 * provided with absolutely no warranty. See the COPYING and CREDITS
9 * files for more information.
12 #ifndef _VAR_IO_H_
13 #define _VAR_IO_H_
15 extern int read_var_integer(unsigned char *source, int *offset);
17 // For streaming varints from a specialized data buffer that is first
18 // delta-encoded, then varint-encoded.
19 struct varint_unpacker {
20 char* data; // pointer to stream of bytes
21 int index; // byte index from start of data
22 int limit; // ending value for 'index'
23 uword_t word; // scratch word used only if the input was a fixnum
26 void varint_unpacker_init(struct varint_unpacker*, lispobj);
27 int varint_unpack(struct varint_unpacker*, int*);
29 #endif /* _VAR_IO_H_ */