~/talk

Cython in Practice: A Deep Dive into Legacy C Integration and Debugging

Talkat PyCon US 2025 · 2025-05-16..05-18· [python]
links:none on file
slides:none on file

Cython wrapper for the Triangle C library compiles to under a thousand lines and ultimately runs on Linux Mac Windows after fixing concrete issues: an unsigned long size mismatch (4 vs 8 bytes) is changed to unsigned long long, pointer aliasing that causes double frees is replaced by copying, and holes/regions buffers are reallocated correctly. Runtime stepping uses GDB; memory corruption and invalid read/writes are diagnosed with Valgrind. Packaging uses Poetry then CI-built manylinux wheels with a uV/scikit-build workaround.

AI-written summary · about

  1. 0:00Cython and legacy C
  2. 3:55Triangle library wrapper
  3. 7:44Cython conventions and types
  4. 10:51Memory corruption on Windows
  5. 13:43Valgrind for memory errors
  6. 16:55Data type compatibility
  7. 18:23Double-free memory errors
  8. 20:49Packaging with Poetry
  9. 22:57UV and scikit-build-core
  10. 24:00Key takeaways
  11. 25:22Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.