/* universal.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
* by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
*/
/*
* "The roots of those mountains must be roots indeed; there must be
* great secrets buried there which have not been discovered since the
* beginning." --Gandalf, relating Gollum's story
*/
#include "EXTERN.h"
#define PERL_IN_UNIVERSAL_C
#include "perl.h"
#ifdef USE_PERLIO
#include "perliol.h" /* For the PERLIO_F_XXX */
#endif
/*
* Contributed by Graham Barr <Graham.Barr@tiuk.ti.com>
* The main guts of traverse_isa was actually copied from gv_fetchmeth
*/
{
we compare the stash itself just in case */
return &PL_sv_yes;
return &PL_sv_yes;
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) {
continue;
}
return &PL_sv_yes;
}
}
}
}
return &PL_sv_no;
}
/*
=head1 SV Manipulation Functions
=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 {
}
== &PL_sv_yes)
? TRUE
: FALSE ;
}
#include "XSUB.h"
void
{
newXSproto("Internals::hv_clear_placeholders",
newXSproto("PerlIO::get_layers",
}
{
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) {
if (pkg)
"%s does not define $%s::VERSION--version check failed",
else {
"%s defines neither package nor VERSION--version check failed", str);
}
}
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);
}
{
if (items != 1)
{
{
else
}
}
}
{
if (items != 1)
{
{
else
}
}
}
{
if (items != 1)
{
}
}
{
if (items != 1)
{
bool RETVAL;
sv_2mortal(ST(0));
}
XSRETURN(1);
}
{
if (items != 1)
{
}
XSRETURN(1);
}
{
{
bool failok;
bool RETVAL;
if (items < 2)
failok = 0;
else {
}
sv_2mortal(ST(0));
}
XSRETURN(1);
}
{
if (items > 1)
XSRETURN(1);
}
{
if (items > 1)
XSRETURN(1);
}
{
if (items == 1) {
if (SvREADONLY(sv))
else
}
else if (items == 2) {
}
else {
/* I hope you really know what you are doing. */
}
}
XSRETURN_UNDEF; /* Can't happen. */
}
{
if (items == 1)
else if (items == 2) {
/* I hope you really know what you are doing. */
}
XSRETURN_UNDEF; /* Can't happen. */
}
{
if (items != 1)
XSRETURN(0);
}
{
}
{
#ifdef USE_PERLIO
{
if (items > 1) {
switch (*key) {
case 'i':
break;
}
goto fail;
case 'o':
break;
}
goto fail;
case 'd':
break;
}
goto fail;
default:
fail:
"get_layers: unknown argument '%s'",
key);
}
}
}
else
}
I32 i;
for (i = last; i >= 0; i -= 3) {
if (details) {
if (flgok)
else
nitem += 3;
}
else {
else if (namok)
else
nitem++;
if (flgok) {
if (flags & PERLIO_F_UTF8) {
nitem++;
}
}
}
}
}
}
#endif
XSRETURN(0);
}
{
/* Using dXSARGS would also have dITEM and dSP,
* which define 2 unused local variables. */
}
{
/* Using dXSARGS would also have dITEM and dSP,
* which define 2 unused local variables. */
}
{
else
}
}
}