Documentation
¶
Overview ¶
Command cshared is the c-shared library the PHP bindings load through FFI.
The exported wrappers live in the generated exports_gen.go; this file holds the hand-written pieces they rely on: the conversion helpers and the two fixed entry points that manage memory and client lifetime.
Ownership rule for the whole ABI: every encx_ function returning char * returns a malloc'd JSON envelope that belongs to the caller. PHP must release it with encx_string_free once the string has been copied into a PHP value. Nothing on the Go side keeps a reference to it, and Go's garbage collector never sees it, so a caller that forgets to free leaks.
Click to show internal directories.
Click to hide internal directories.