Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c33e82d2
Commit
c33e82d2
authored
May 05, 2010
by
Brett Cannon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to a Py_XDECREF and fix some whitespace.
Found using Clang's static analyzer.
parent
1771ecf8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
Python/pythonrun.c
Python/pythonrun.c
+8
-8
No files found.
Python/pythonrun.c
View file @
c33e82d2
...
...
@@ -138,7 +138,7 @@ Py_InitializeEx(int install_sigs)
PyThreadState
*
tstate
;
PyObject
*
bimod
,
*
sysmod
;
char
*
p
;
char
*
icodeset
=
NULL
;
/* On Windows, input codeset may theoretically
char
*
icodeset
=
NULL
;
/* On Windows, input codeset may theoretically
differ from output codeset. */
char
*
codeset
=
NULL
;
char
*
errors
=
NULL
;
...
...
@@ -237,7 +237,7 @@ Py_InitializeEx(int install_sigs)
if
(
install_sigs
)
initsigs
();
/* Signal handling stuff, including initintr() */
/* Initialize warnings. */
_PyWarnings_Init
();
if
(
PySys_HasWarnOptions
())
{
...
...
@@ -339,7 +339,7 @@ Py_InitializeEx(int install_sigs)
sys_isatty
=
PyObject_CallMethod
(
sys_stream
,
"isatty"
,
""
);
if
(
!
sys_isatty
)
PyErr_Clear
();
if
((
overridden
||
if
((
overridden
||
(
sys_isatty
&&
PyObject_IsTrue
(
sys_isatty
)))
&&
PyFile_Check
(
sys_stream
))
{
if
(
!
PyFile_SetEncodingAndErrors
(
sys_stream
,
codeset
,
errors
))
...
...
@@ -351,7 +351,7 @@ Py_InitializeEx(int install_sigs)
sys_isatty
=
PyObject_CallMethod
(
sys_stream
,
"isatty"
,
""
);
if
(
!
sys_isatty
)
PyErr_Clear
();
if
((
overridden
||
if
((
overridden
||
(
sys_isatty
&&
PyObject_IsTrue
(
sys_isatty
)))
&&
PyFile_Check
(
sys_stream
))
{
if
(
!
PyFile_SetEncodingAndErrors
(
sys_stream
,
codeset
,
errors
))
...
...
@@ -701,7 +701,7 @@ initmain(void)
if
(
bimod
==
NULL
||
PyDict_SetItemString
(
d
,
"__builtins__"
,
bimod
)
!=
0
)
Py_FatalError
(
"can't add __builtins__ to __main__"
);
Py_DECREF
(
bimod
);
Py_
X
DECREF
(
bimod
);
}
}
...
...
@@ -1297,7 +1297,7 @@ PyRun_StringFlags(const char *str, int start, PyObject *globals,
PyArena
*
arena
=
PyArena_New
();
if
(
arena
==
NULL
)
return
NULL
;
mod
=
PyParser_ASTFromString
(
str
,
"<string>"
,
start
,
flags
,
arena
);
if
(
mod
!=
NULL
)
ret
=
run_mod
(
mod
,
"<string>"
,
globals
,
locals
,
flags
,
arena
);
...
...
@@ -1314,7 +1314,7 @@ PyRun_FileExFlags(FILE *fp, const char *filename, int start, PyObject *globals,
PyArena
*
arena
=
PyArena_New
();
if
(
arena
==
NULL
)
return
NULL
;
mod
=
PyParser_ASTFromFile
(
fp
,
filename
,
start
,
0
,
0
,
flags
,
NULL
,
arena
);
if
(
closeit
)
...
...
@@ -1804,7 +1804,7 @@ PyOS_CheckStack(void)
alloca
(
PYOS_STACK_MARGIN
*
sizeof
(
void
*
));
return
0
;
}
__except
(
GetExceptionCode
()
==
STATUS_STACK_OVERFLOW
?
EXCEPTION_EXECUTE_HANDLER
:
EXCEPTION_EXECUTE_HANDLER
:
EXCEPTION_CONTINUE_SEARCH
)
{
int
errcode
=
_resetstkoflw
();
if
(
errcode
==
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment