Changeset 7c3fb9b in mainline for uspace/lib/bithenge/src/tree.c
- Timestamp:
- 2018-05-17T08:29:01Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ff23ff
- Parents:
- fac0ac7
- git-author:
- Jiri Svoboda <jiri@…> (2018-05-16 17:28:17)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-05-17 08:29:01)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/bithenge/src/tree.c
rfac0ac7 r7c3fb9b 71 71 /** Decrement a node's reference count and free it if appropriate. 72 72 * @memberof bithenge_node_t 73 * @param node The node to dereference, or NULL. */ 73 * @param node The node to dereference, or NULL. 74 */ 74 75 void bithenge_node_dec_ref(bithenge_node_t *node) 75 76 { … … 112 113 * @param[out] out Holds the found node. 113 114 * @return EOK on success, ENOENT if not found, or another error code from 114 * errno.h. */ 115 * errno.h. 116 */ 115 117 errno_t bithenge_node_get(bithenge_node_t *self, bithenge_node_t *key, 116 118 bithenge_node_t **out) … … 154 156 * @param[out] self The node. 155 157 * @param[in] ops The operations provided. 156 * @return EOK on success or an error code from errno.h. */ 158 * @return EOK on success or an error code from errno.h. 159 */ 157 160 errno_t bithenge_init_internal_node(bithenge_node_t *self, 158 161 const bithenge_internal_node_ops_t *ops) … … 195 198 /** Create an empty internal node. 196 199 * @param[out] out Holds the created node. 197 * @return EOK on success or an error code from errno.h. */ 200 * @return EOK on success or an error code from errno.h. 201 */ 198 202 errno_t bithenge_new_empty_internal_node(bithenge_node_t **out) 199 203 { … … 262 266 * @param needs_free If true, when the internal node is destroyed it will free 263 267 * the nodes array rather than just dereferencing each node inside it. 264 * @return EOK on success or an error code from errno.h. */ 268 * @return EOK on success or an error code from errno.h. 269 */ 265 270 errno_t bithenge_new_simple_internal_node(bithenge_node_t **out, 266 271 bithenge_node_t **nodes, bithenge_int_t len, bool needs_free) … … 298 303 * @param[out] out Stores the created boolean node. 299 304 * @param value The value for the node to hold. 300 * @return EOK on success or an error code from errno.h. */ 305 * @return EOK on success or an error code from errno.h. 306 */ 301 307 errno_t bithenge_new_boolean_node(bithenge_node_t **out, bool value) 302 308 { … … 313 319 * @param[out] out Stores the created integer node. 314 320 * @param value The value for the node to hold. 315 * @return EOK on success or an error code from errno.h. */ 321 * @return EOK on success or an error code from errno.h. 322 */ 316 323 errno_t bithenge_new_integer_node(bithenge_node_t **out, bithenge_int_t value) 317 324 { … … 333 340 * @param needs_free Whether the string should be freed when the node is 334 341 * destroyed. 335 * @return EOK on success or an error code from errno.h. */ 342 * @return EOK on success or an error code from errno.h. 343 */ 336 344 errno_t bithenge_new_string_node(bithenge_node_t **out, const char *value, bool needs_free) 337 345 { … … 357 365 * @param a, b Nodes to compare. 358 366 * @return EOK on success or an error code from errno.h. 359 * @todo Add support for internal nodes. */ 367 * @todo Add support for internal nodes. 368 */ 360 369 errno_t bithenge_node_equal(bool *out, bithenge_node_t *a, bithenge_node_t *b) 361 370 {
Note:
See TracChangeset
for help on using the changeset viewer.