Changeset 5c925ce in mainline for uspace/app/bithenge/blob.c
- Timestamp:
- 2012-06-07T17:00:12Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8375d0eb
- Parents:
- 5f679702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bithenge/blob.c
r5f679702 r5c925ce 42 42 #include <stdlib.h> 43 43 #include "blob.h" 44 #include "tree.h" 44 45 45 46 /** Initialize a random access blob. … … 59 60 assert(ops->size); 60 61 61 blob->ops = ops; 62 blob->base.type = BITHENGE_NODE_BLOB; 63 blob->base.blob_ops = ops; 62 64 return EOK; 63 65 } … … 234 236 * @param len The length of the data. 235 237 * @return EOK on success or an error code from errno.h. */ 236 int bithenge_new_blob_from_data(bithenge_ blob_t **out, const void *data,238 int bithenge_new_blob_from_data(bithenge_node_t **out, const void *data, 237 239 size_t len) 238 240 { … … 258 260 blob->size = len; 259 261 blob->needs_free = true; 260 *out = b lob_from_memory(blob);262 *out = bithenge_blob_as_node(blob_from_memory(blob)); 261 263 return EOK; 262 264 } … … 273 275 * blob is destroyed. 274 276 * @return EOK on success or an error code from errno.h. */ 275 int bithenge_new_blob_from_buffer(bithenge_ blob_t **out, const void *buffer,277 int bithenge_new_blob_from_buffer(bithenge_node_t **out, const void *buffer, 276 278 size_t len, bool needs_free) 277 279 { … … 291 293 blob->size = len; 292 294 blob->needs_free = needs_free; 293 *out = b lob_from_memory(blob);295 *out = bithenge_blob_as_node(blob_from_memory(blob)); 294 296 return EOK; 295 297 }
Note:
See TracChangeset
for help on using the changeset viewer.