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
77e62d47
Commit
77e62d47
authored
Jul 07, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"#if WITH_THREAD" is incorrect; must be #ifdef instead; WITH_THREAD
isn't always set to an integer value when it's defined.
parent
72cf1bb9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Parser/myreadline.c
Parser/myreadline.c
+4
-4
No files found.
Parser/myreadline.c
View file @
77e62d47
...
@@ -22,7 +22,7 @@ extern char* vms__StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
...
@@ -22,7 +22,7 @@ extern char* vms__StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
PyThreadState
*
_PyOS_ReadlineTState
;
PyThreadState
*
_PyOS_ReadlineTState
;
#if WITH_THREAD
#if
def
WITH_THREAD
#include "pythread.h"
#include "pythread.h"
static
PyThread_type_lock
_PyOS_ReadlineLock
=
NULL
;
static
PyThread_type_lock
_PyOS_ReadlineLock
=
NULL
;
#endif
#endif
...
@@ -181,7 +181,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
...
@@ -181,7 +181,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
#endif
#endif
}
}
#if WITH_THREAD
#if
def
WITH_THREAD
if
(
_PyOS_ReadlineLock
==
NULL
)
{
if
(
_PyOS_ReadlineLock
==
NULL
)
{
_PyOS_ReadlineLock
=
PyThread_allocate_lock
();
_PyOS_ReadlineLock
=
PyThread_allocate_lock
();
}
}
...
@@ -189,7 +189,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
...
@@ -189,7 +189,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
_PyOS_ReadlineTState
=
PyThreadState_GET
();
_PyOS_ReadlineTState
=
PyThreadState_GET
();
Py_BEGIN_ALLOW_THREADS
Py_BEGIN_ALLOW_THREADS
#if WITH_THREAD
#if
def
WITH_THREAD
PyThread_acquire_lock
(
_PyOS_ReadlineLock
,
1
);
PyThread_acquire_lock
(
_PyOS_ReadlineLock
,
1
);
#endif
#endif
...
@@ -205,7 +205,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
...
@@ -205,7 +205,7 @@ PyOS_Readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
prompt
);
prompt
);
Py_END_ALLOW_THREADS
Py_END_ALLOW_THREADS
#if WITH_THREAD
#if
def
WITH_THREAD
PyThread_release_lock
(
_PyOS_ReadlineLock
);
PyThread_release_lock
(
_PyOS_ReadlineLock
);
#endif
#endif
...
...
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