v0.5.3
Runtime extension composition
Pnlx\Runtime::compose([Libsdl::class, Sdlimage::class]) fuses several generated
extensions into one shared FFI scope, so a \FFI\CData returned by one package
(e.g. an SDL2_image surface from IMG_Load) can be passed straight into another
package's function (SDL_CreateTextureFromSurface). Previously each extension
booted its own FFI::cdef scope and PHP FFI rejected cross-scope CData.
- Members' generated cdefs are merged (
Pnlx\FFI\CdefComposer) and their libraries
co-loaded into a singleNativeLibrary(NativeLibrary::composite()); each member
class adopts that scope (AbstractExtension::pnlxAdoptNativeLibrary()), so its
generated methods keep marshalling and return-wrapping unchanged — only the native
scope is shared. - Returns a
Pnlx\ComposedScopethat also proxies calls
(Runtime::compose([A, B])->some_function(...)); plainA::fn()/B::fn()static
calls share the scope too.
Code generation
- Pointer-to-const scalars (
const int *,const double *) are now treated as
read-only input arrays instead of writable by-reference out-params — fixes passing
nullwhere PHP cannot pass a literal by reference (libopenal/libswscale). - Structs defined with a body always get a
Types\*wrapper now, even when no
function names them, so a struct handed back throughvoid *(hiredis's
redisReply) can be re-wrapped. - Generated enums gain
toInt()(alias of->value), mirroring the integer-wrapper
API of scalar returns. - Typed wrappers
reinterpret()an incoming\FFI\CDatato their own type.
Native-library resolution
- pkg-config lookup also tries a
lib-prefixed module name (enet->libenet). - Headers living under
include/<pkg>/add theincluderoot to the parse path, so
angle includes carrying the subdir prefix resolve (lzo's<lzo/lzodefs.h>).
Build / runtime
- The embedded PHP SDK (
include_dir!) is rebuilt whenever anysrc/sdkfile
changes, via a build-script content fingerprint — SDK fixes always ship in the
binary instead of silently going stale. Pnlx\Util::isNull()added as a static null-pointer check for generated code.