pycapnp/capnp
Lasse Blaauwbroek aafec2281e Make reraise_kj_exception available to downstream
I'm using Pycapnp in a project, where we compile `.capnp` files directly to
Cython instead of using the dynamic interface (for speed). For this, we need
access to the `reraise_kj_exception` C function defined by Pycapnp. This is not
possible, because Cython does not automatically make this function available to
downstream users.

My previous solution, in #301, was rather flawed. The  file `capabilityHelper.cpp`, where
`reraise_kj_exception` is defined, was bundled into the distribution, so that
this file could be included in downstream libraries. This turns out to be a
terrible idea, because it redefines a bunch of other things like
`ReadPromiseAdapter`. For reasons not entirely clear to me, this leads to
segmentation faults. This PR revers #301.

Instead, in this PR I've made `reraise_kj_exception` a Cython-level function,
that can be used by downstream libraries. The C-level variant has been renamed
to `c_reraise_kj_exception`.
2023-11-05 13:58:13 -08:00
..
helpers Make reraise_kj_exception available to downstream 2023-11-05 13:58:13 -08:00
includes Make reraise_kj_exception available to downstream 2023-11-05 13:58:13 -08:00
lib Make reraise_kj_exception available to downstream 2023-11-05 13:58:13 -08:00
templates bool → cbool (probably just a typo) 2021-04-25 21:51:12 +02:00
__init__.pxd Refactor layout of pxd files 2013-12-08 17:27:59 -08:00
__init__.py Get rid of VoidPromise and (almost) Promise 2023-06-08 08:02:07 +02:00
_gen.py Applying black formatting 2021-10-01 11:12:21 -07:00