nostrdb/content_parser: add initial db decoders
We need to pull the data out as well! Let's add some initial decoders. We still need tests to make sure it's working. Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
c3b06d281e
commit
d73422db38
@@ -360,6 +360,11 @@ static inline int cursor_push_u16(struct cursor *cursor, unsigned short i)
|
||||
return cursor_push(cursor, (unsigned char*)&i, sizeof(i));
|
||||
}
|
||||
|
||||
static inline int cursor_pull_u16(struct cursor *cursor, uint16_t *i)
|
||||
{
|
||||
return cursor_pull(cursor, (unsigned char*)i, sizeof(*i));
|
||||
}
|
||||
|
||||
static inline void *index_cursor(struct cursor *cursor, unsigned int index, int elem_size)
|
||||
{
|
||||
unsigned char *p;
|
||||
|
||||
Reference in New Issue
Block a user