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
406c721e
Commit
406c721e
authored
Feb 28, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ref fixes
parent
819424ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
11 deletions
+13
-11
from_cpython/Include/ceval.h
from_cpython/Include/ceval.h
+4
-4
src/capi/modsupport.cpp
src/capi/modsupport.cpp
+1
-1
src/runtime/builtin_modules/builtins.cpp
src/runtime/builtin_modules/builtins.cpp
+6
-4
src/runtime/capi.cpp
src/runtime/capi.cpp
+2
-1
src/runtime/types.cpp
src/runtime/types.cpp
+0
-1
No files found.
from_cpython/Include/ceval.h
View file @
406c721e
...
...
@@ -27,10 +27,10 @@ PyAPI_FUNC(void) PyEval_SetTrace(Py_tracefunc, PyObject *) PYSTON_NOEXCEPT;
struct
_frame
;
/* Avoid including frameobject.h */
PyAPI_FUNC
(
PyObject
*
)
PyEval_GetBuiltins
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
PyObject
*
)
PyEval_GetGlobals
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
PyObject
*
)
PyEval_GetLocals
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
struct
_frame
*
)
PyEval_GetFrame
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
BORROWED
(
PyObject
*
)
)
PyEval_GetBuiltins
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
BORROWED
(
PyObject
*
)
)
PyEval_GetGlobals
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
BORROWED
(
PyObject
*
)
)
PyEval_GetLocals
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
BORROWED
(
struct
_frame
*
)
)
PyEval_GetFrame
(
void
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
int
)
PyEval_GetRestricted
(
void
)
PYSTON_NOEXCEPT
;
/* Look at the current frame's (if any) code's co_flags, and turn on
...
...
src/capi/modsupport.cpp
View file @
406c721e
...
...
@@ -431,7 +431,7 @@ extern "C" PyObject* Py_InitModule4(const char* name, PyMethodDef* methods, cons
return
module
;
}
extern
"C"
PyObject
*
PyModule_GetDict
(
BORROWED
(
PyObject
*
)
_m
)
noexcept
{
extern
"C"
BORROWED
(
PyObject
*
)
PyModule_GetDict
(
PyObject
*
_m
)
noexcept
{
BoxedModule
*
m
=
static_cast
<
BoxedModule
*>
(
_m
);
assert
(
PyModule_Check
(
m
));
...
...
src/runtime/builtin_modules/builtins.cpp
View file @
406c721e
...
...
@@ -469,6 +469,7 @@ Box* bltinImport(Box* name, Box* globals, Box* locals, Box** args) {
// which ignores it. So we don't even pass it through.
name
=
coerceUnicodeToStr
<
CXX
>
(
name
);
AUTO_DECREF
(
name
);
if
(
name
->
cls
!=
str_cls
)
{
raiseExcHelper
(
TypeError
,
"__import__() argument 1 must be string, not %s"
,
getTypeName
(
name
));
...
...
@@ -1209,8 +1210,9 @@ Box* locals() {
return
fastLocalsToBoxedLocals
();
}
extern
"C"
PyObject
*
PyEval_GetLocals
(
void
)
noexcept
{
extern
"C"
BORROWED
(
PyObject
*
)
PyEval_GetLocals
(
void
)
noexcept
{
try
{
assert
(
0
&&
"check refcounting"
);
return
locals
();
}
catch
(
ExcInfo
e
)
{
setCAPIException
(
e
);
...
...
@@ -1218,16 +1220,16 @@ extern "C" PyObject* PyEval_GetLocals(void) noexcept {
}
}
extern
"C"
PyObject
*
PyEval_GetGlobals
(
void
)
noexcept
{
extern
"C"
BORROWED
(
PyObject
*
)
PyEval_GetGlobals
(
void
)
noexcept
{
try
{
return
globals
(
);
return
autoXDecref
(
globals
()
);
}
catch
(
ExcInfo
e
)
{
setCAPIException
(
e
);
return
NULL
;
}
}
extern
"C"
PyObject
*
PyEval_GetBuiltins
(
void
)
noexcept
{
extern
"C"
BORROWED
(
PyObject
*
)
PyEval_GetBuiltins
(
void
)
noexcept
{
return
builtins_module
;
}
...
...
src/runtime/capi.cpp
View file @
406c721e
...
...
@@ -1579,7 +1579,8 @@ extern "C" void PyEval_RestoreThread(PyThreadState* tstate) noexcept {
endAllowThreads
();
}
extern
"C"
struct
_frame
*
PyEval_GetFrame
(
void
)
noexcept
{
extern
"C"
BORROWED
(
struct
_frame
*
)
PyEval_GetFrame
(
void
)
noexcept
{
assert
(
0
&&
"check refcounting"
);
Box
*
frame
=
NULL
;
try
{
frame
=
getFrame
(
0
);
...
...
src/runtime/types.cpp
View file @
406c721e
...
...
@@ -4151,7 +4151,6 @@ void setupRuntime() {
_PyUnicode_Init
();
unicode_cls
->
is_constant
=
true
;
unicode_cls
->
is_user_defined
=
false
;
_PyWarnings_Init
();
_string_init
();
setupDescr
();
setupCode
();
...
...
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