And returns pointer to error CString pointer without touching result_len.
I set result_len to C.SIZE_MAX (zero is correct protobuf message size) as CString with error marker and always return error if result_len was unchanged.
4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
[X] N
[ ] Y
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:
[X] Unit test
[ ] Integration test
[ ] Benchmark (add benchmark stats below)
[ ] Manual test (add detailed scripts or steps below)
1. Does this PR affect any open issues?(Y/N) and add issue references:
Fix #260, again
2. What is the scope of this PR (e.g. component or file name):
pkg/native
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
KCL method
kclvm_service_call_with_length
don't changeresult_len
on negative scenario: https://github.com/kcl-lang/kcl/blob/d6ba71a3118b8756bf85d29f8ac221052f893ded/kclvm/api/src/service/capi.rs#L155-L162And returns pointer to error CString pointer without touching
result_len
. I setresult_len
toC.SIZE_MAX
(zero is correct protobuf message size) as CString with error marker and always return error ifresult_len
was unchanged.4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links: