Changeset 32eb01b in mainline for uspace/app/bithenge/transform.h
- Timestamp:
- 2012-07-28T04:19:00Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f85ca3f
- Parents:
- 4056ad0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bithenge/transform.h
r4056ad0 r32eb01b 88 88 } 89 89 90 /** Copy a scope. 91 * @param[out] out The scope to fill in; must have been initialized with @a 92 * bithenge_scope_init. 93 * @param scope The scope to copy. 94 * @return EOK on success or an error code from errno.h. */ 95 static inline int bithenge_scope_copy(bithenge_scope_t *out, 96 bithenge_scope_t *scope) 97 { 98 out->params = malloc(sizeof(*out->params) * scope->num_params); 99 if (!out->params) 100 return ENOMEM; 101 memcpy(out->params, scope->params, sizeof(*out->params) * 102 scope->num_params); 103 out->num_params = scope->num_params; 104 for (int i = 0; i < out->num_params; i++) 105 bithenge_node_inc_ref(out->params[i]); 106 return EOK; 107 } 108 90 109 /** Allocate parameters. The parameters must then be set with @a 91 110 * bithenge_scope_set_param.
Note:
See TracChangeset
for help on using the changeset viewer.