Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
40ca1cc7
Commit
40ca1cc7
authored
Oct 01, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add readline module with some pyston changes
parent
67973cf6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
from_cpython/CMakeLists.txt
from_cpython/CMakeLists.txt
+2
-0
from_cpython/Modules/readline.c
from_cpython/Modules/readline.c
+5
-3
from_cpython/setup.py
from_cpython/setup.py
+7
-0
No files found.
from_cpython/CMakeLists.txt
View file @
40ca1cc7
...
...
@@ -123,6 +123,7 @@ add_custom_command(OUTPUT
${
CMAKE_BINARY_DIR
}
/lib_pyston/bz2.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_ctypes.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/grp.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/readline.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/termios.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/_curses.pyston.so
${
CMAKE_BINARY_DIR
}
/lib_pyston/mmap.pyston.so
...
...
@@ -149,6 +150,7 @@ add_custom_command(OUTPUT
Modules/_elementtree.c
Modules/bz2module.c
Modules/grpmodule.c
Modules/readline.c
Modules/termios.c
Modules/_cursesmodule.c
Modules/mmapmodule.c
...
...
from_cpython/Modules/readline.c
View file @
40ca1cc7
...
...
@@ -1063,8 +1063,10 @@ readline_until_enter_or_signal(char *prompt, int *signal)
#endif
/*defined(HAVE_RL_CALLBACK) && defined(HAVE_SELECT) */
// Pyston changes: change the type of 3rd argument from char* to const char*
// To match the type of Pyston PyOS_ReadlineFunctionPointer.
static
char
*
call_readline
(
FILE
*
sys_stdin
,
FILE
*
sys_stdout
,
char
*
prompt
)
call_readline
(
FILE
*
sys_stdin
,
FILE
*
sys_stdout
,
c
onst
c
har
*
prompt
)
{
size_t
n
;
char
*
p
,
*
q
;
...
...
@@ -1085,7 +1087,7 @@ call_readline(FILE *sys_stdin, FILE *sys_stdout, char *prompt)
#endif
}
p
=
readline_until_enter_or_signal
(
prompt
,
&
signal
);
p
=
readline_until_enter_or_signal
(
(
char
*
)
prompt
,
&
signal
);
/* we got an interrupt signal */
if
(
signal
)
{
...
...
@@ -1167,6 +1169,6 @@ initreadline(void)
if
(
m
==
NULL
)
return
;
PyOS_ReadlineFunctionPointer
=
call_readline
;
PyOS_ReadlineFunctionPointer
=
&
call_readline
;
setup_readline
();
}
from_cpython/setup.py
View file @
40ca1cc7
...
...
@@ -82,6 +82,12 @@ def curses_ext():
"Modules/_cursesmodule.c"
,
]),
libraries
=
[
'curses'
])
@
unique
def
readline_ext
():
return
Extension
(
"readline"
,
sources
=
map
(
relpath
,
[
"Modules/readline.c"
,
]))
@
unique
def
termios_ext
():
return
Extension
(
"termios"
,
sources
=
map
(
relpath
,
[
...
...
@@ -142,6 +148,7 @@ ext_modules = [future_builtins_ext(),
ctypes_test_ext
(),
grp_ext
(),
curses_ext
(),
readline_ext
(),
termios_ext
(),
mmap_ext
(),
]
...
...
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