Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make reraise_kj_exception available to downstream #344

Merged
merged 1 commit into from
Nov 5, 2023

Commits on Nov 5, 2023

  1. 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 capnproto#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 capnproto#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`.
    LasseBlaauwbroek committed Nov 5, 2023
    Configuration menu
    Copy the full SHA
    c2827a3 View commit details
    Browse the repository at this point in the history