universal.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
#include "EXTERN.h"
#define PERL_IN_UNIVERSAL_C
#include "perl.h"
/*
* Contributed by Graham Barr <Graham.Barr@tiuk.ti.com>
* The main guts of traverse_isa was actually copied from gv_fetchmeth
*/
{
if (!stash)
return &PL_sv_undef;
return &PL_sv_yes;
if (level > 100)
{
return sv;
}
}
else {
}
}
if (!hv)
if (!subgen) {
}
}
if (hv) {
/* NOTE: No support for tied ISA */
while (items--) {
if (!basestash) {
"Can't locate package %s for @%s::ISA",
continue;
}
return &PL_sv_yes;
}
}
}
}
}
/*
=for apidoc sv_derived_from
Returns a boolean indicating whether the SV is derived from the specified
class. This is the function that implements C<UNIVERSAL::isa>. It works
for class names as well as for objects.
=cut
*/
bool
{
char *type;
if (SvGMAGICAL(sv))
}
else {
}
? TRUE
: FALSE ;
}
void
{
}
#include "XSUB.h"
{
char *name;
if (items != 2)
if (SvGMAGICAL(sv))
XSRETURN(1);
}
{
char *name;
if (items != 2)
if (SvGMAGICAL(sv))
rv = &PL_sv_undef;
}
else {
}
if (pkg) {
}
XSRETURN(1);
}
{
char *undef;
}
else {
}
}
else {
undef = "(undef)";
}
if (items > 1) {
if (undef)
while (len) {
--len;
/* XXX could DWIM "1.2.3" here */
break;
}
if (len) {
/* they said C<use Foo v1.2.3> and $Foo::VERSION
* doesn't look like a float: do string compare */
"this is only v%"VDf,
}
goto finish;
}
/* they said C<use Foo 1.002_003> and $Foo::VERSION
* doesn't look like a float: force numeric compare */
}
}
/* if we get here, we're looking for a numeric comparison,
* so force the required version into a float, even if they
* said C<use Foo v1.2.3> */
req = sv_newmortal();
}
}
XSRETURN(1);
}