summaryrefslogtreecommitdiff
path: root/prism/options.c
diff options
context:
space:
mode:
-rw-r--r--prism/options.c12
1 files changed, 12 insertions, 0 deletions
@@ -181,6 +181,7 @@ PRISM_EXPORTED_FUNCTION bool
pm_options_scope_init(pm_options_scope_t *scope, size_t locals_count) {
scope->locals_count = locals_count;
scope->locals = xcalloc(locals_count, sizeof(pm_string_t));
return scope->locals != NULL;
}
@@ -193,6 +194,14 @@ pm_options_scope_local_get(const pm_options_scope_t *scope, size_t index) {
}
/**
* Free the internal memory associated with the options.
*/
PRISM_EXPORTED_FUNCTION void
@@ -300,6 +309,9 @@ pm_options_read(pm_options_t *options, const char *data) {
return;
}
for (size_t local_index = 0; local_index < locals_count; local_index++) {
uint32_t local_length = pm_options_read_u32(data);
data += 4;