mirror of
git://jb55.com/damus
synced 2024-09-19 11:43:44 +00:00
c: add new cursor util
this is used by nostrdb as well. so add it here ahead of time.
This commit is contained in:
parent
8f04b12a90
commit
08bea16be0
@ -303,6 +303,10 @@ static inline int cursor_pull_int(struct cursor *cursor, int *i)
|
|||||||
return cursor_pull(cursor, (u8*)i, sizeof(*i));
|
return cursor_pull(cursor, (u8*)i, sizeof(*i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline int cursor_push_u32(struct cursor *cursor, uint32_t i) {
|
||||||
|
return cursor_push(cursor, (unsigned char*)&i, sizeof(i));
|
||||||
|
}
|
||||||
|
|
||||||
static inline int cursor_push_u16(struct cursor *cursor, u16 i)
|
static inline int cursor_push_u16(struct cursor *cursor, u16 i)
|
||||||
{
|
{
|
||||||
return cursor_push(cursor, (u8*)&i, sizeof(i));
|
return cursor_push(cursor, (u8*)&i, sizeof(i));
|
||||||
|
Loading…
Reference in New Issue
Block a user