| 1 |
enum gsl_anova_twoway_types T_PTROBJ |
| 2 |
############################################################################# |
| 3 |
INPUT |
| 4 |
T_OPAQUE_STRUCT |
| 5 |
if (sv_derived_from($arg, \"${ntype}\")) { |
| 6 |
STRLEN len; |
| 7 |
char *s = SvPV((SV*)SvRV($arg), len); |
| 8 |
|
| 9 |
if (len != sizeof($var)) |
| 10 |
croak(\"Size %d of packed data != expected %d\", |
| 11 |
len, sizeof($var)); |
| 12 |
$var = *($type *)s; |
| 13 |
} |
| 14 |
else |
| 15 |
croak(\"$var is not of type ${ntype}\") |
| 16 |
############################################################################# |
| 17 |
OUTPUT |
| 18 |
T_OPAQUE_STRUCT |
| 19 |
sv_setref_pvn($arg, \"${ntype}\", (char *)&$var, sizeof($var)); |