The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dyn::Callback::Args - dyncall args C API

DESCRIPTION

dyncall args provides serialized access to arguments of a function call.

These functions are used in hand rolled Dyn::Callback systems.

Methods

This package exposes the following functions...

dcbArgBool( $args )

Returns the next value on the stack and assumes it is a bool.

dcbArgChar( $args )

Returns the next value on the stack and assumes it is a char.

dcbArgUChar( $args )

Returns the next value on the stack and assumes it is an unsigned char.

dcbArgShort( $args )

Returns the next value on the stack and assumes it is a short.

dcbArgUShort( $args )

Returns the next value on the stack and assumes it is a unsigned short.

dcbArgInt( $args )

Returns the next value on the stack and assumes it is an int.

dcbArgUInt( $args )

Returns the next value on the stack and assumes it is an unsigned int.

dcbArgLong( $args )

Returns the next value on the stack and assumes it is a long.

dcbArgULong( $args )

Returns the next value on the stack and assumes it is a unsigned long.

dcbArgLongLong( $args )

Returns the next value on the stack and assumes it is a long long.

dcbArgULongLong( $args )

Returns the next value on the stack and assumes it is an unsigned long long.

dcbArgFloat( $args )

Returns the next value on the stack and assumes it is a float.

dcbArgDouble( $args )

Returns the next value on the stack and assumes it is a double.

dcbArgPointer( $args )

Returns the next value on the stack and assumes it is a pointer (void *).

dcbArgAggr( $args, $target )

Returns the next value on the stack and assumes it is an aggregate.

For trivial aggrs, $target points to space to copy the aggregate to, and $target is returned.

For C++ non-trivial aggrs, $target is ignored, and a pointer to the aggregate is returned.

dcbArgString( $args )

Returns the next value on the stack and assumes it is a string (const char *).

dcbReturnAggr( $args, $result, $ret )

This is a helper function to put a to be returned struct-by-value into the $result param of the callback handler; for C++ non-trivial aggrs, pass undef in $ret, then copy the aggregate into $result->p.

LICENSE

Copyright (C) Sanko Robinson.

This library is free software; you can redistribute it and/or modify it under the terms found in the Artistic License 2. Other copyrights, terms, and conditions may apply to data transmitted through this module.

AUTHOR

Sanko Robinson <sanko@cpan.org>