#include <ucw/fastbuf.h>
#include <ucw/varint.h>
+#ifdef CONFIG_UCW_CLEAN_ABI
+#define bget_varint_slow ucw_bget_varint_slow
+#define bput_varint_slow ucw_bput_varint_slow
+#endif
+
u64 bget_varint_slow(struct fastbuf *b, u64 repl);
void bput_varint_slow(struct fastbuf *b, u64 u);
if (bavailr(b) >= 1) {
l = varint_len(*b->bptr);
if (bavailr(b) >= l) {
- b->bptr += l;
varint_get(b->bptr, &repl);
+ b->bptr += l;
return repl;
}
}
* Reads u64 encoded as varint from the fastbuf b.
* If the read is unsuccessful, returns ~0LLU.
**/
-static inline int bget_varint(struct fastbuf *b)
+static inline u64 bget_varint(struct fastbuf *b)
{
return bget_varint_repl(b, ~0LLU);
}