| 60 | } |
| 61 | |
| 62 | SerdNode |
| 63 | serd_node_copy(const SerdNode* node) |
| 64 | { |
| 65 | if (!node || !node->buf) { |
| 66 | return SERD_NODE_NULL; |
| 67 | } |
| 68 | |
| 69 | SerdNode copy = *node; |
| 70 | uint8_t* buf = (uint8_t*)malloc(copy.n_bytes + 1); |
| 71 | memcpy(buf, node->buf, copy.n_bytes + 1); |
| 72 | copy.buf = buf; |
| 73 | return copy; |
| 74 | } |
| 75 | |
| 76 | bool |
| 77 | serd_node_equals(const SerdNode* a, const SerdNode* b) |
no outgoing calls