• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1    bool [param_name_replace]In = 0;
2    /* [NAPI_GEN]: napi_get_value_bool将一个 napi_value 类型的 js 布尔值转换成一个 C 语言的 bool 类型的数值
3     * env: N-API环境的句柄,表示当前的上下文
4     * value:要转换的JavaScript值
5     * result:指向 bool 类型的指针,在这里函数将存储转换后的布尔值
6     */
7    status = napi_get_value_bool(env, args[[param_index_replace]], &[param_name_replace]In);
8    if (status != napi_ok) {
9        getErrMessage(status, env, extended_error_info, "napi_get_value_bool", tag);
10        return nullptr;
11    }
12
13