ExtUtils-Constant
view release on metacpan or search on metacpan
lib/ExtUtils/Constant.pm view on Meta::CPAN
SV * sv;
const char * s = SvPV(sv, len);
EOT
if ($params->{''}) {
$xs .= << 'EOT';
INPUT:
int utf8 = SvUTF8(sv);
EOT
}
$xs .= << 'EOT';
PPCODE:
EOT
if ($params->{IV} xor $params->{NV}) {
$xs .= << "EOT";
/* Change this to $C_subname(aTHX_ s, len, &iv, &nv);
if you need to return both NVs and IVs */
EOT
}
$xs .= " type = $C_subname(aTHX_ s, len";
$xs .= ', utf8' if $params->{''};
lib/ExtUtils/Constant/ProxySubs.pm view on Meta::CPAN
EOC
void
AUTOLOAD()
PROTOTYPE: DISABLE
PREINIT:
SV *sv = newSVpvn_flags(SvPVX(cv), SvCUR(cv), SVs_TEMP | SvUTF8(cv));
const COP *cop = PL_curcop;
EOA
print $xs_fh <<"EOC";
PPCODE:
#ifndef SYMBIAN
/* It's not obvious how to calculate this at C pre-processor time.
However, any compiler optimiser worth its salt should be able to
remove the dead code, and hopefully the now-obviously-unused static
function too. */
HV *${c_subname}_missing = (C_ARRAY_LENGTH(values_for_notfound) > 1)
? get_missing_hash(aTHX) : NULL;
if ((C_ARRAY_LENGTH(values_for_notfound) > 1)
? hv_exists_ent(${c_subname}_missing, sv, 0) : 0) {
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
lib/ExtUtils/Constant/ProxySubs.pm view on Meta::CPAN
}
croak_sv(sv_2mortal(sv));
EOC
} else {
print $xs_fh $explosives ? <<"EXPLODE" : <<"DONT";
void
$xs_subname(sv)
INPUT:
SV * sv;
PPCODE:
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
", used", sv);
PUSHs(sv_2mortal(sv));
EXPLODE
void
$xs_subname(sv)
INPUT:
SV * sv;
PPCODE:
#ifndef SYMBIAN
/* It's not obvious how to calculate this at C pre-processor time.
However, any compiler optimiser worth its salt should be able to
remove the dead code, and hopefully the now-obviously-unused static
function too. */
HV *${c_subname}_missing = (C_ARRAY_LENGTH(values_for_notfound) > 1)
? get_missing_hash(aTHX) : NULL;
if ((C_ARRAY_LENGTH(values_for_notfound) > 1)
? hv_exists_ent(${c_subname}_missing, sv, 0) : 0) {
sv = newSVpvf("Your vendor has not defined $package_sprintf_safe macro %" SVf
( run in 0.456 second using v1.01-cache-2.11-cpan-5511b514fd6 )