/* * This file was generated automatically by ExtUtils::ParseXS version 2.18 from the * contents of Object.xs. Do not edit this file, edit Object.xs instead. * * ANY CHANGES MADE HERE WILL BE LOST! * */ #line 1 "Object.xs" /* Copyright (c) 1997-2005 -*- C -*- Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany) http://www.math.tu-berlin.de/polymake, mailto:polymake@math.tu-berlin.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version: http://www.gnu.org/licenses/gpl.txt. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. */ #ident "$Project: polymake $$Id: Object.xs 6652 2005-12-21 19:51:48Z gawrilow $" #include "Ext.h" #ifndef PERL_UNUSED_VAR # define PERL_UNUSED_VAR(var) if (0) var = var #endif #line 34 "Object.c" XS(XS_Poly__Object__prop_set_accessor); /* prototype to pass -Wmissing-prototypes */ XS(XS_Poly__Object__prop_set_accessor) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 1) Perl_croak(aTHX_ "Usage: %s(%s)", "Poly::Object::_prop_set_accessor", "prop"); PERL_UNUSED_VAR(cv); /* -W */ { SV * prop = ST(0); #line 28 "Object.xs" { PERL_CONTEXT *cx_bottom=cxstack, *cx_top=cx_bottom+cxstack_ix, *cx=cx_top; OP *o; AV *args=GvAV(PL_defgv); U8 save_flags=AvREIFY(args); AvREIFY_off(args); av_push(args, prop); /* pushed into the current @_ */ while (cx >= cx_bottom) { if (CxTYPE(cx) == CXt_SUB) { cx->blk_sub.lval=0; if (!avoid_db_sub || cx->blk_sub.cv == avoid_db_sub) { o=PL_retstack[cx->blk_oldretsp-1]; if (o->op_type != OP_LEAVESUB) { if (o->op_type == OP_SASSIGN && !(o->op_private & OPpASSIGN_BACKWARDS)) { SV *rhs=*(PL_stack_base+cx->blk_oldsp); /* value to be assigned ... */ av_push(args, rhs); AvFLAGS(args) |= save_flags; PL_retstack[cx->blk_oldretsp-1]=o->op_next; /* skip pp_sassign */ XSRETURN_YES; } break; } } } --cx; } AvFLAGS(args) |= save_flags; XSRETURN_NO; } #line 79 "Object.c" } XSRETURN_EMPTY; } XS(XS_Poly__Object__get_alternatives); /* prototype to pass -Wmissing-prototypes */ XS(XS_Poly__Object__get_alternatives) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif if (items != 0) Perl_croak(aTHX_ "Usage: %s(%s)", "Poly::Object::_get_alternatives", ""); PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(ax); /* -Wall */ SP -= items; { #line 62 "Object.xs" { PERL_CONTEXT *cx_bottom=cxstack, *cx=cx_bottom+cxstack_ix; while (cx >= cx_bottom) { if (CxTYPE(cx) == CXt_SUB && (!avoid_db_sub || cx->blk_sub.cv == avoid_db_sub)) { OP *o=PL_retstack[cx->blk_oldretsp-1]; if (o->op_type != OP_LEAVESUB) { I32 skip=FALSE, push=GIMME_V==G_ARRAY; #ifdef USE_ITHREADS SV **saved_curpad=0; #endif while (o->op_type == OP_CONST && o->op_next->op_type == OP_BIT_OR) { if (push) { #ifdef USE_ITHREADS if (!skip) { saved_curpad=PL_curpad; PL_curpad=get_cx_curpad(aTHX_ cx, cx_bottom); } #endif XPUSHs(cSVOPo_sv); } skip=TRUE; o=o->op_next->op_next; } if (skip) { PL_retstack[cx->blk_oldretsp-1]=o; #ifdef USE_ITHREADS if (push) PL_curpad=saved_curpad; #endif } break; } } --cx; } } #line 135 "Object.c" PUTBACK; return; } } #ifdef __cplusplus extern "C" #endif XS(boot_Poly__Object); /* prototype to pass -Wmissing-prototypes */ XS(boot_Poly__Object) { #ifdef dVAR dVAR; dXSARGS; #else dXSARGS; #endif char* file = __FILE__; PERL_UNUSED_VAR(cv); /* -W */ PERL_UNUSED_VAR(items); /* -W */ XS_VERSION_BOOTCHECK ; newXS("Poly::Object::_prop_set_accessor", XS_Poly__Object__prop_set_accessor, file); newXS("Poly::Object::_get_alternatives", XS_Poly__Object__get_alternatives, file); /* Initialisation Section */ #line 100 "Object.xs" if (PL_DBgv) { CvNODEBUG_on(get_cv("Poly::Object::_prop_set_accessor", FALSE)); CvNODEBUG_on(get_cv("Poly::Object::_get_alternatives", FALSE)); } #line 169 "Object.c" /* End of Initialisation Section */ XSRETURN_YES; }