gemini-code-assist[bot] commented on code in PR #666:
URL: https://github.com/apache/tvm-ffi/pull/666#discussion_r3574247885


##########
python/tvm_ffi/cython/pyclass_type_converter.pxi:
##########
@@ -36,9 +36,9 @@ cdef object _INT64_MIN = -(1 << 63)
 cdef object _INT64_MAX = (1 << 63) - 1
 cdef int _VALUE_PROTOCOL_MAX_DEPTH = 64
 cdef str _TYPE_ATTR_FFI_CONVERT = "__ffi_convert__"
-cdef str _TYPE_ATTR_ENUM_VALUE_ENTRIES = "__ffi_enum_value_entries__"
+cdef str _TYPE_ATTR_ENUM_STATE = "__ffi_enum__"
 cdef class _TypeConverter
-ctypedef CAny (*_dispatch_fn_t)(_TypeConverter, object, bint*) except *
+ctypedef CAny (*_dispatch_fn_t)(_TypeConverter, object, bint*)

Review Comment:
   ![critical](https://www.gstatic.com/codereviewagent/critical.svg)
   
   In Cython 3.0, the default exception behavior for `cdef` functions has 
changed to `noexcept`. Removing `except *` from the `_dispatch_fn_t` function 
pointer typedef and the corresponding `cdef` converter functions across this 
file means they will be treated as `noexcept` by default. Any Python exceptions 
(such as `_ConvertError` or `TypeError`) raised during type conversion will be 
silently swallowed or lead to undefined behavior/crashes.\n\nPlease restore 
`except *` on this typedef and all the `cdef` converter functions in this file 
to ensure correct exception propagation.
   
   ```
   ctypedef CAny (*_dispatch_fn_t)(_TypeConverter, object, bint*) except *
   ```



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to