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
61a7ab64
Commit
61a7ab64
authored
Aug 20, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get cffi-1.7 building
parent
2a4e46ea
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
6 deletions
+15
-6
from_cpython/Include/pystate.h
from_cpython/Include/pystate.h
+3
-2
src/core/threading.cpp
src/core/threading.cpp
+7
-3
src/runtime/builtin_modules/builtins.cpp
src/runtime/builtin_modules/builtins.cpp
+1
-0
src/runtime/builtin_modules/sys.cpp
src/runtime/builtin_modules/sys.cpp
+2
-0
src/runtime/import.cpp
src/runtime/import.cpp
+2
-1
No files found.
from_cpython/Include/pystate.h
View file @
61a7ab64
...
...
@@ -20,12 +20,13 @@ typedef struct _is {
struct
_is
*
next
;
struct
_ts
*
tstate_head
;
PyObject
*
modules
;
PyObject
*
builtins
;
// Pyston change
// Note: any changes here need to show up in PyInterpreterState_Clear as well
#if 0
PyObject *modules;
PyObject *sysdict;
PyObject *builtins;
PyObject *modules_reloading;
PyObject *codec_search_path;
...
...
src/core/threading.cpp
View file @
61a7ab64
...
...
@@ -62,7 +62,7 @@ static PyThread_type_lock head_mutex = NULL; /* Protects interp->tstate_head */
#define HEAD_UNLOCK()
/* Nothing */
#endif
PyInterpreterState
interpreter_state
;
static
PyInterpreterState
interpreter_state
;
std
::
unordered_set
<
PerThreadSetBase
*>
PerThreadSetBase
::
all_instances
;
...
...
@@ -509,10 +509,14 @@ extern "C" void PyInterpreterState_Clear(PyInterpreterState* interp) noexcept {
// Py_CLEAR(interp->codec_search_path);
// Py_CLEAR(interp->codec_search_cache);
// Py_CLEAR(interp->codec_error_registry);
//
Py_CLEAR(interp->modules);
Py_CLEAR
(
interp
->
modules
);
// Py_CLEAR(interp->modules_reloading);
// Py_CLEAR(interp->sysdict);
// Py_CLEAR(interp->builtins);
Py_CLEAR
(
interp
->
builtins
);
}
extern
"C"
void
PyThreadState_DeleteCurrent
()
noexcept
{
Py_FatalError
(
"unimplemented"
);
}
extern
"C"
void
PyThreadState_Clear
(
PyThreadState
*
tstate
)
noexcept
{
...
...
src/runtime/builtin_modules/builtins.cpp
View file @
61a7ab64
...
...
@@ -2376,6 +2376,7 @@ void setupBuiltins() {
builtins_module
=
createModule
(
autoDecref
(
boxString
(
"__builtin__"
)),
NULL
,
"Built-in functions, exceptions, and other objects.
\n\n
Noteworthy: None is "
"the `nil' object; Ellipsis represents `...' in slices."
);
PyThreadState_GET
()
->
interp
->
builtins
=
incref
(
builtins_module
->
getAttrWrapper
());
ellipsis_cls
=
BoxedClass
::
create
(
type_cls
,
object_cls
,
0
,
0
,
sizeof
(
Box
),
false
,
"ellipsis"
,
false
,
NULL
,
NULL
,
false
);
...
...
src/runtime/builtin_modules/sys.cpp
View file @
61a7ab64
...
...
@@ -795,6 +795,8 @@ static int _check_and_flush(FILE* stream) {
void
setupSys
()
{
sys_modules_dict
=
new
BoxedDict
();
PyThreadState_GET
()
->
interp
->
modules
=
incref
(
sys_modules_dict
);
constants
.
push_back
(
sys_modules_dict
);
// This is ok to call here because we've already created the sys_modules_dict
...
...
src/runtime/import.cpp
View file @
61a7ab64
...
...
@@ -139,8 +139,9 @@ extern "C" Box* import(int level, Box* from_imports, llvm::StringRef module_name
BoxedModule
*
importCExtension
(
BoxedString
*
full_name
,
const
std
::
string
&
last_name
,
const
std
::
string
&
path
)
{
void
*
handle
=
dlopen
(
path
.
c_str
(),
RTLD_NOW
);
if
(
!
handle
)
{
const
char
*
s
=
dlerror
();
// raiseExcHelper(ImportError, "%s", dlerror());
fprintf
(
stderr
,
"%s
\n
"
,
dlerror
()
);
fprintf
(
stderr
,
"%s
\n
"
,
s
);
exit
(
1
);
}
assert
(
handle
);
...
...
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