Skip to content

Commit a2b2c5a

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

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

dsl/optscript.c

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

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

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)