nostrdb: add ndb_builder_push_tag_id
Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
Daniel D’Aquino
parent
fa2d240ddf
commit
0847c53a39
@@ -7739,6 +7739,16 @@ int ndb_builder_push_tag_str(struct ndb_builder *builder,
|
|||||||
return ndb_builder_finalize_tag(builder, pstr);
|
return ndb_builder_finalize_tag(builder, pstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Push an id element to the current tag. Needs to be 32 bytes
|
||||||
|
int ndb_builder_push_tag_id(struct ndb_builder *builder,
|
||||||
|
unsigned char *id)
|
||||||
|
{
|
||||||
|
union ndb_packed_str pstr;
|
||||||
|
if (!ndb_builder_push_packed_id(builder, id, &pstr))
|
||||||
|
return 0;
|
||||||
|
return ndb_builder_finalize_tag(builder, pstr);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// CONFIG
|
// CONFIG
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -551,6 +551,7 @@ void ndb_builder_set_id(struct ndb_builder *builder, unsigned char *id);
|
|||||||
void ndb_builder_set_kind(struct ndb_builder *builder, uint32_t kind);
|
void ndb_builder_set_kind(struct ndb_builder *builder, uint32_t kind);
|
||||||
int ndb_builder_new_tag(struct ndb_builder *builder);
|
int ndb_builder_new_tag(struct ndb_builder *builder);
|
||||||
int ndb_builder_push_tag_str(struct ndb_builder *builder, const char *str, int len);
|
int ndb_builder_push_tag_str(struct ndb_builder *builder, const char *str, int len);
|
||||||
|
int ndb_builder_push_tag_id(struct ndb_builder *builder, unsigned char *id);
|
||||||
|
|
||||||
// FILTERS
|
// FILTERS
|
||||||
int ndb_filter_init(struct ndb_filter *);
|
int ndb_filter_init(struct ndb_filter *);
|
||||||
|
|||||||
Reference in New Issue
Block a user