| 1 |
ffi_pl_string T_FFI_PL_STRING |
| 2 |
ffi_pl_type* T_FFI_PL_TYPE |
| 3 |
ffi_pl_function* T_FFI_PL_FUNCTION |
| 4 |
ffi_pl_closure* T_FFI_PL_CLOSURE_DATA |
| 5 |
ffi_pl_arguments* T_FFI_PL_ARGUMENTS |
| 6 |
|
| 7 |
OUTPUT |
| 8 |
T_FFI_PL_STRING |
| 9 |
$var != NULL ? sv_setpv((SV*)$arg, $var) : sv_setsv((SV*)$arg, &PL_sv_undef); |
| 10 |
|
| 11 |
T_FFI_PL_TYPE |
| 12 |
sv_setref_pv($arg, \"FFI::Platypus::Type\", (void *) $var); |
| 13 |
|
| 14 |
T_FFI_PL_FUNCTION |
| 15 |
sv_setref_pv($arg, \"FFI::Platypus::Function::Function\", (void *) $var); |
| 16 |
|
| 17 |
T_FFI_PL_CLOSURE_DATA |
| 18 |
sv_setref_pv($arg, \"FFI::Platypus::ClosureData\", (void *) $var); |
| 19 |
|
| 20 |
INPUT |
| 21 |
T_FFI_PL_STRING |
| 22 |
$var = SvOK($arg) ? ($type)SvPV_nolen($arg) : NULL; |
| 23 |
|
| 24 |
T_FFI_PL_TYPE |
| 25 |
if(sv_isobject($arg) && sv_derived_from($arg, \"FFI::Platypus::Type\")) |
| 26 |
$var = INT2PTR($type, SvIV((SV *) SvRV($arg))); |
| 27 |
else |
| 28 |
Perl_croak(aTHX_ \"$var is not of type FFI::Platypus::Type\"); |
| 29 |
|
| 30 |
T_FFI_PL_FUNCTION |
| 31 |
if(sv_isobject($arg) && sv_derived_from($arg, \"FFI::Platypus::Function::Function\")) |
| 32 |
$var = INT2PTR($type, SvIV((SV *) SvRV($arg))); |
| 33 |
else |
| 34 |
Perl_croak(aTHX_ \"$var is not of type FFI::Platypus::Function::Function\"); |
| 35 |
|
| 36 |
T_FFI_PL_CLOSURE_DATA |
| 37 |
if(sv_isobject($arg) && sv_derived_from($arg, \"FFI::Platypus::ClosureData\")) |
| 38 |
$var = INT2PTR($type, SvIV((SV *) SvRV($arg))); |
| 39 |
else |
| 40 |
Perl_croak(aTHX_ \"$var is not of type FFI::Platypus::ClosureData\"); |
| 41 |
|
| 42 |
T_FFI_PL_ARGUMENTS |
| 43 |
if(sv_isobject($arg) && sv_derived_from($arg, \"FFI::Platypus::API::ARGV\")) |
| 44 |
$var = INT2PTR($type, SvIV((SV *) SvRV($arg))); |
| 45 |
else |
| 46 |
Perl_croak(aTHX_ \"$var is not of type FFI::Platypus::API::ARGV\"); |