Hey @nelson2005 following up on the post you linked here’s what all my ‘scary’ intrinsics ended up looking like:
code: numbert/utils.py at experimental · DannyWeitekamp/numbert · GitHub
tests: numbert/test_utils.py at experimental · DannyWeitekamp/numbert · GitHub
Be sure to incref and decref stuff when appropriate and test lots. Although using intrinsics like this has the advantage of allowing you to dereference ‘pointers’, it has a tendency to introduce segfaults and memory leaks if you’re not careful. Personally although I’ve come to rely on this for my own application and have been able to make things work robustly I’m a little bit afraid of it because numba or llvmlite could change something with how they handle increfs/decrefs and then all my code could break. Livin’ dangerously I guess.