Skip to main content

Module c_api

Module c_api 

Source
Expand description

Public C API entry points.

Each submodule exposes extern "C" functions that cbindgen collects into rgpot-core/include/rgpot.h. All functions in this module follow three invariants:

  1. Return rgpot_status_t (or a pointer / void for constructors and destructors).
  2. Wrap the body in catch_unwind to prevent panics from crossing the FFI boundary.
  3. Validate pointer arguments and call set_last_error before returning a non-success status.

§Submodules

Modules§

potential
C API for the potential handle lifecycle: create, calculate, free.
types
Convenience constructors for the core C types.