Skip to content

Commit

Permalink
Prevent pointer conversion within @classmethod and improve Cython t…
Browse files Browse the repository at this point in the history
…yping (#165)

Converting `shared_ptr`->`void*`->`uintptr_t` is a very cumbersome and error prone solution. By instantiating the object within the `@classmethod` scope we can thus prevent calling the constructor again where the conversion is necessary. The downside is we now must set member attributes also in the scope of `@classmethod`, but that should be a better tradeoff to the pointer conversion.

Improve static typing in Cython where missing types were missing (exceptions are `cb_func` as it seems typing functions is not possible/trivial with Cython), as well as making `UCXXTag`/`UCXXTagMask` Cython classes so that they can be used as Cython types.

Authors:
  - Peter Andreas Entschev (https://github.com/pentschev)

Approvers:
  - Charles Blackmon-Luca (https://github.com/charlesbluca)

URL: #165
  • Loading branch information
pentschev authored Jan 18, 2024
1 parent 73b9fa4 commit efb0d0b
Show file tree
Hide file tree
Showing 3 changed files with 255 additions and 260 deletions.
Loading

0 comments on commit efb0d0b

Please sign in to comment.