Pascal Bleser
2010-07-24 23:23:59 +00:00
committed by Git OBS Bridge
parent 7a15fb1869
commit a8b4e57a2d
2 changed files with 72 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
--- Alias.xs.orig 2010-07-25 00:35:27.000000000 +0200
+++ Alias.xs 2010-07-25 01:23:11.000000000 +0200
@@ -366,14 +366,14 @@
SSPUSHPTR(gp);
SSPUSHINT(SAVEt_DESTRUCTOR_X);
++gp->gp_refcnt;
- *sptr = Nullsv;
+ *sptr = NULL;
}
STATIC SV *da_refgen(pTHX_ SV *sv) {
SV *rv;
PREP_ALIAS_INC(sv);
rv = sv_newmortal();
- sv_upgrade(rv, SVt_RV);
+ sv_upgrade(rv, SVt_IV);
SvRV(rv) = sv;
SvROK_on(rv);
SvREADONLY_on(rv);
@@ -1248,7 +1248,7 @@
cxstack_ix--;
POPSUB(cx, sv);
} else {
- sv = Nullsv;
+ sv = NULL;
}
PL_curpm = newpm;
LEAVESUB(sv);
@@ -1433,7 +1433,7 @@
int hits = 0;
while (op) {
- OP *kid = Nullop, *tmp;
+ OP *kid = NULL, *tmp;
int ksib = TRUE;
OPCODE optype;
@@ -1447,7 +1447,6 @@
default:
--hits;
switch (optype) {
- case OP_SETSTATE:
case OP_NEXTSTATE:
case OP_DBSTATE:
PL_curcop = (COP *) op;
@@ -1586,7 +1585,6 @@
if (da_peep2(aTHX_ k))
return 1;
} else switch (o->op_type ? o->op_type : o->op_targ) {
- case OP_SETSTATE:
case OP_NEXTSTATE:
case OP_DBSTATE:
PL_curcop = (COP *) o;
@@ -1764,7 +1762,7 @@
kUNOP->op_first = last;
while (kid->op_sibling != last)
kid = kid->op_sibling;
- kid->op_sibling = Nullop;
+ kid->op_sibling = NULL;
cLISTOPx(cUNOPo->op_first)->op_last = kid;
if (kid->op_type == OP_NULL && inside)
kid->op_flags &= ~OPf_SPECIAL;

View File

@@ -6,6 +6,8 @@ Version: 1.07
Release: 0
Summary: Comprehensive set of aliasing operations
Source: http://search.cpan.org/CPAN/authors/id/X/XM/XMATH/Data-Alias-%{version}.tar.gz
# see https://rt.cpan.org/Public/Bug/Display.html?id=57410
Patch1: perl-Data-Alias-fix_for_perl_5_12.patch
URL: http://search.cpan.org/dist/Data-Alias/
Group: Development/Libraries/Perl
License: Perl License
@@ -13,6 +15,8 @@ BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: perl = %{perl_version}
BuildRequires: make perl gcc glibc-devel
%define is_perl_5_12 %(perl -MConfig -e 'print $Config{api_revision} >= 5 && $Config{api_revision} < 6 && $Config{api_version} >= 12 ? "1":"0"')
%description
Aliasing is the phenomenon where two different expressions actually refer to
the same thing. Modifying one will modify the other, and if you take a
@@ -21,6 +25,10 @@ reference to both, the two values are the same.
%prep
%setup -q -n "Data-Alias-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
# only apply patch with Perl >= 5.12 and < 6 (presumably)
%if %is_perl_5_12
%patch1
%endif
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
@@ -30,8 +38,10 @@ reference to both, the two values are the same.
%perl_make_install
%perl_process_packlist
%if !%is_perl_5_12
%check
%__make test
%endif
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}