fresh-borzoni commented on code in PR #409:
URL: https://github.com/apache/fluss-rust/pull/409#discussion_r2875158505


##########
bindings/cpp/src/ffi_converter.hpp:
##########
@@ -37,6 +37,11 @@ inline Result from_ffi_result(const ffi::FfiResult& 
ffi_result) {
     return Result{ffi_result.error_code, 
std::string(ffi_result.error_message)};
 }
 
+template <typename T>
+inline T* ptr_from_ffi(const ffi::FfiPtrResult& r) {
+    return reinterpret_cast<T*>(r.ptr);

Review Comment:
   Good point. This helper is only intended to be used after checking 
result.Ok(), so a null pointer here indicates misuse or a broken FFI invariant 
rather than a normal runtime case. 
   I’ll add an assert to make that contract explicit.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to