cshared

command
v0.18.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL