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
86a995bc
Commit
86a995bc
authored
Feb 03, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some C/C++ capi issues
parent
762fe84b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
from_cpython/Include/Python.h
from_cpython/Include/Python.h
+9
-1
src/runtime/types.cpp
src/runtime/types.cpp
+3
-2
No files found.
from_cpython/Include/Python.h
View file @
86a995bc
...
...
@@ -90,6 +90,10 @@
#include "warnings.h"
#include "weakrefobject.h"
#ifdef __cplusplus
extern
"C"
{
#endif
// Pyston additions:
// These new APIS give access to our fast hidden-class-based attributes implementation.
// Ideally in the future this will just be "storage strategy" of dicts and all Python
...
...
@@ -104,7 +108,7 @@ typedef struct _hcattrs PyHcAttrs;
namespace
pyston
{
class
HCAttrs
;
}
typedef
int
PyHcAttrs
;
typedef
pyston
::
HCAttrs
PyHcAttrs
;
#endif
PyAPI_FUNC
(
void
)
PyObject_InitHcAttrs
(
PyHcAttrs
*
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
PyObject
*
)
PyObject_GetAttrWrapper
(
PyObject
*
)
PYSTON_NOEXCEPT
;
...
...
@@ -134,6 +138,10 @@ PyAPI_FUNC(PyObject*) PyGC_RegisterStaticConstant(PyObject*) PYSTON_NOEXCEPT;
PyAPI_FUNC
(
void
)
PyGC_Enable
()
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
void
)
PyGC_Disable
()
PYSTON_NOEXCEPT
;
#ifdef __cplusplus
}
#endif
#include "codecs.h"
#include "pyerrors.h"
...
...
src/runtime/types.cpp
View file @
86a995bc
...
...
@@ -1350,7 +1350,7 @@ static void typeSubSetDict(Box* obj, Box* val, void* context) {
abort
();
}
extern
"C"
void
PyType_SetDict
(
PyTypeObject
*
type
,
PyObject
*
dict
)
{
extern
"C"
void
PyType_SetDict
(
PyTypeObject
*
type
,
PyObject
*
dict
)
noexcept
{
typeSubSetDict
(
type
,
dict
,
NULL
);
type
->
tp_dict
=
dict
;
}
...
...
@@ -3673,8 +3673,9 @@ int BoxedClosure::clear(Box* _o) noexcept {
#endif
std
::
vector
<
Box
*>
constants
;
extern
"C"
void
PyGC_RegisterStaticConstant
(
Box
*
b
)
{
extern
"C"
PyObject
*
PyGC_RegisterStaticConstant
(
Box
*
b
)
noexcept
{
constants
.
push_back
(
b
);
return
b
;
}
extern
"C"
void
_PyUnicode_Fini
(
void
);
...
...
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