Skip to content

Commit c16a378

Browse files
committed
optscript: introduce opt_dict_known_and_get as new C API
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
1 parent c6c34d0 commit c16a378

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

dsl/optscript.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -689,6 +689,12 @@ opt_dict_known_and_get_cstr (EsObject *dict, const char* name, EsObject **val)
689689
return dict_op_known_and_get (dict, sym, val);
690690
}
691691

692+
bool
693+
opt_dict_known_and_get (EsObject *dict, EsObject *key, EsObject **val)
694+
{
695+
return dict_op_known_and_get (dict, key, val);
696+
}
697+
692698
bool
693699
opt_dict_foreach (EsObject *dict, bool (* fn) (EsObject *, EsObject *, void*), void *data)
694700
{

dsl/optscript.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ unsigned int opt_vm_ostack_count (OptVM *vm);
5353

5454
EsObject *opt_dict_new (unsigned int size);
5555
bool opt_dict_known_and_get_cstr (EsObject *dict, const char* name, EsObject **val);
56+
bool opt_dict_known_and_get (EsObject *dict, EsObject *key, EsObject **val);
5657
bool opt_dict_foreach (EsObject *dict, bool (* fn) (EsObject *, EsObject *, void*), void *data);
5758
void opt_dict_def (EsObject *dict, EsObject *sym, EsObject *val);
5859
bool opt_dict_undef (EsObject *dict, EsObject *sym);

0 commit comments

Comments
 (0)