Minimal pycapnp

This commit is contained in:
Adeeb Shihadeh
2026-09-21 18:57:37 -07:00
parent a0cb5cdf06
commit 5befba15f3
125 changed files with 423 additions and 14793 deletions

18
capnp/helpers/exception.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
#include <Python.h>
#include <kj/exception.h>
#include <stdexcept>
class GILAcquire {
public:
GILAcquire() : gstate(PyGILState_Ensure()) {}
~GILAcquire() {
PyGILState_Release(gstate);
}
PyGILState_STATE gstate;
};
void c_reraise_kj_exception();
void init_capnp_api();