Searched refs:strBufferSize (Results 1 – 2 of 2) sorted by relevance
/ohos5.0/foundation/distributeddatamgr/preferences/frameworks/js/napi/storage/src/ |
H A D | napi_storage.cpp | 171 size_t strBufferSize = 0; in ParseString() local 172 napi_status status = napi_get_value_string_utf8(env, jsStr, nullptr, 0, &strBufferSize); in ParseString() 177 if (strBufferSize > maxLength) { in ParseString() 181 char *str = new (std::nothrow) char[strBufferSize + 1]; in ParseString() 187 status = napi_get_value_string_utf8(env, jsStr, str, strBufferSize + 1, &valueSize); in ParseString()
|
/ohos5.0/foundation/distributeddatamgr/data_share/frameworks/js/napi/common/src/ |
H A D | datashare_js_utils.cpp | 750 size_t strBufferSize = DEFAULT_BUF_SIZE; in Convert2Value() local 751 napi_get_value_string_utf8(env, input, nullptr, 0, &strBufferSize); in Convert2Value() 752 char *buf = new (std::nothrow) char[strBufferSize + 1]; in Convert2Value() 757 napi_get_value_string_utf8(env, input, buf, strBufferSize + 1, &len); in Convert2Value()
|