xsutils.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/* xsutils.c
*
* Copyright (C) 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.
*
*/
/*
* "Perilous to us all are the devices of an art deeper than we possess
* ourselves." --Gandalf
*/
#include "EXTERN.h"
#define PERL_IN_XSUTILS_C
#include "perl.h"
/*
* Contributed by Spider Boardman (spider.boardman@orb.nashua.nh.us).
*/
/* package attributes; */
/*
* Note that only ${pkg}::bootstrap definitions should go here.
* This helps keep down the start-up time, which is especially
* relevant for users who don't invoke any features which are
* (partially) implemented here.
*
* The various bootstrap definitions can take care of doing
* package-specific newXS() calls. Since the layout of the
* bundled *.pm files is in a version-specific directory,
* version checks in these bootstrap calls are optional.
*/
void
{
}
#include "XSUB.h"
static int
{
char *name;
bool negated;
int nret;
name++;
len--;
}
case SVt_PVCV:
switch ((int)len) {
case 6:
switch (*name) {
case 'l':
#ifdef CVf_LVALUE
if (negated)
else
continue;
}
#endif /* defined CVf_LVALUE */
if (negated)
else
continue;
}
break;
case 'm':
if (negated)
else
continue;
}
break;
}
break;
}
break;
default:
switch ((int)len) {
case 6:
switch (*name) {
case 's':
if (negated)
continue;
}
break;
case 'u':
if (negated)
else
}
/* Hope this came from toke.c if not a GV. */
continue;
}
}
}
break;
}
/* anything recognized had a 'continue' above */
nret++;
}
return nret;
}
/* package attributes; */
{
if( items > 1 )
XSRETURN(0);
}
{
if (items < 1) {
"Usage: attributes::_modify_attrs $reference, @attributes");
}
goto usage;
if (items > 1)
XSRETURN(0);
}
{
if (items != 1) {
"Usage: attributes::_fetch_attrs $reference");
}
goto usage;
case SVt_PVCV:
if (cvflags & CVf_LOCKED)
#ifdef CVf_LVALUE
if (cvflags & CVf_LVALUE)
#endif
if (cvflags & CVf_METHOD)
break;
case SVt_PVGV:
break;
default:
break;
}
}
{
#ifdef dXSTARGET
#else
#endif
if (items != 1) {
"Usage: attributes::_guess_stash $reference");
}
goto usage;
#if 0 /* this was probably a bad idea */
#endif
else {
case SVt_PVCV:
break;
case SVt_PVMG:
break;
/*FALLTHROUGH*/
case SVt_PVGV:
break;
default:
break;
}
if (stash)
}
#ifdef dXSTARGET
#endif
XSRETURN(1);
}
{
#ifdef dXSTARGET
#else
#endif
if (items != 1) {
"Usage: attributes::reftype $reference");
}
if (SvGMAGICAL(rv))
goto usage;
#ifdef dXSTARGET
#endif
XSRETURN(1);
}
{
#ifdef dXSTARGET
#else
#endif
if (items != 0) {
"Usage: attributes::_warn_reserved ()");
}
#ifdef dXSTARGET
#endif
XSRETURN(1);
}