Go to the source code of this file.
◆ cbor_build_tag()
Build a new tag.
- Parameters
-
item | The item to tag. Its reference count will be increased by one. |
value | The tag value (number). |
- Returns
- Reference to the new tag item. The item's reference count is initialized to one.
-
NULL
if memory allocation fails.
Definition at line 39 of file tags.c.
◆ cbor_new_tag()
Create a new tag.
- Parameters
-
value | The tag value (number). |
- Returns
- Reference to the new tag. Its reference count is initialized to one and it points to a
NULL
item.
-
NULL
if memory allocation fails.
Definition at line 10 of file tags.c.
◆ cbor_tag_item()
Get the tagged item (what the tag points to).
- Parameters
-
- Returns
- Reference to the tagged item.
Increases the reference count of the underlying item. The returned reference must be released using cbor_decref.
Definition at line 23 of file tags.c.
◆ cbor_tag_set_item()
Assign a tag to an item.
- Parameters
-
tag | A CBOR_TYPE_TAG tag. |
tagged_item | The item to tag. Its reference count will be increased by one. |
If the tag already points to an item, the pointer will be replaced, without a reference count change on the previous item. TODO: Should we release the reference automatically?
Definition at line 33 of file tags.c.
◆ cbor_tag_value()
Get the tag value.
- Parameters
-
- Returns
- The tag value (number).
Definition at line 28 of file tags.c.