1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
From 2333fa35c99aae1db1cb8d3ebce31fc21bc66e0a Mon Sep 17 00:00:00 2001
From: Slaven Rezic <slaven@rezic.de>
Date: Sat, 23 Mar 2013 14:00:58 +0100
Subject: [PATCH] * fix for 5.17.7 and newer: SvUPGRADE() is no longer an
expression
---
IO/IO.xs | 6 +-----
tkGlue.c | 5 +----
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/IO/IO.xs b/IO/IO.xs
index 8ae2a57..42f7515 100644
--- a/IO/IO.xs
+++ b/IO/IO.xs
@@ -207,11 +207,7 @@ int offset
info.count = 0;
info.error = 0;
info.eof = 0;
- if (!SvUPGRADE(buf, SVt_PV))
- {
- RETVAL = &PL_sv_undef;
- return;
- }
+ (void)SvUPGRADE(buf, SVt_PV);
SvPOK_only(buf); /* validate pointer */
Tcl_CreateFileHandler(fd, TCL_READABLE, read_handler, (ClientData) &info);
do
diff --git a/tkGlue.c b/tkGlue.c
index dd3d283..cdc53ad 100644
--- a/tkGlue.c
+++ b/tkGlue.c
@@ -3830,10 +3830,7 @@ ClientData clientData;
return EXPIRE((interp, "Cannot trace readonly variable"));
}
}
- if (!SvUPGRADE(sv, SVt_PVMG))
- {
- return EXPIRE((interp, "Trace SvUPGRADE failed"));
- }
+ (void)SvUPGRADE(sv, SVt_PVMG);
if (SvTYPE(sv) == SVt_PVAV)
{
--
1.8.2.3
|