lynx_value_get_int64

介绍

从 lynx_value 中读取 int64_t 值

语法

lynx_api_status lynx_value_get_int64(lynx_api_env env,
                                     lynx_value value,
                                     int64* result);

参数

KeyDescription
[in] envlynx_value 的运行环境,一般情况下是 nullptr
[in] valueint64_t 类型的 lynx_value
[out] result读取的 int64_t 值.

返回值

Returns lynx_api_ok if the API succeeded. Returns lynx_api_int64_expected if the types do not match.

示例

int64_t ret;
lynx_api_status status = lynx_value_get_int64(env, value, &ret);
if (status != lynx_api_ok) {
  // handle error.
}
除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。