change dic.get to return an error code upon search failure

This commit is contained in:
2018-02-17 16:45:17 +00:00
parent 093ee93a3c
commit 21cddab62f
2 changed files with 4 additions and 5 deletions

View File

@ -1138,7 +1138,8 @@ struct hcl_t
HCL_STACK_SETTOP(hcl, (retv)); \
} while(0)
#define HCL_STACK_SETRETTORCV(hcl,nargs) (HCL_STACK_POPS(hcl, nargs))
#define HCL_STACK_SETRETTOERRNUM(hcl,nargs) HCL_STACK_SETRET(hcl, nargs, HCL_ERROR_TO_OOP(hcl->errnum))
#define HCL_STACK_SETRETTOERROR(hcl,nargs,ec) HCL_STACK_SETRET(hcl, nargs, HCL_ERROR_TO_OOP(ec))
/* =========================================================================