NAME
ExtUtils::Typemaps::OpaqueObj - Typemap for storing objects as a string reference
VERSION
version 0.001
SYNOPSIS
In typemap
Foo::Bar T_OPAQUEOBJ
In your XS:
typedef struct foo_bar* Foo__Bar;
MODULE = Foo::Bar PACKAGE = Foo::Bar PREFIX = foobar_
Foo::Bar foobar_new(SV* class, int argument)
int foobar_baz(Foo::Bar self)
DESCRIPTION
ExtUtils::Typemaps::OpaqueObj
is an ExtUtils::Typemaps
subclass that stores an object inside a string reference. It is particularly suitable for objects whose entire state is helt in the struct (e.g. no pointers, handles, descriptors, …). In such cases the object will serialize and deserialize cleanly, and is safe with regards to thread cloning.
AUTHOR
Leon Timmermans <fawaka@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2024 by Leon Timmermans.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.