summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-03-30 08:09:31 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-03-30 08:09:31 (GMT)
commite134a7fe36652434c2ccffc4ebab2ec2031d1505 (patch)
tree9eea060bf19c856881f438860eb2abdbe41f2bdd /Python/marshal.c
parent2e1c4e5db2894ec4322f917e9babc4e37dca9244 (diff)
downloadcpython-e134a7fe36652434c2ccffc4ebab2ec2031d1505.zip
cpython-e134a7fe36652434c2ccffc4ebab2ec2031d1505.tar.gz
cpython-e134a7fe36652434c2ccffc4ebab2ec2031d1505.tar.bz2
Issue #23752: _Py_fstat() is now responsible to raise the Python exception
Add _Py_fstat_noraise() function when a Python exception is not welcome.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 3472882..f89cd04 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -1486,7 +1486,7 @@ static off_t
getfilesize(FILE *fp)
{
struct _Py_stat_struct st;
- if (_Py_fstat(fileno(fp), &st) != 0)
+ if (_Py_fstat_noraise(fileno(fp), &st) != 0)
return -1;
#if SIZEOF_OFF_T == 4
else if (st.st_size >= INT_MAX)