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
09b408ac
Commit
09b408ac
authored
Apr 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support C++ extensions that are not C++11
parent
45c15d87
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
4 deletions
+15
-4
from_cpython/Include/object.h
from_cpython/Include/object.h
+4
-4
from_cpython/Include/pyport.h
from_cpython/Include/pyport.h
+11
-0
No files found.
from_cpython/Include/object.h
View file @
09b408ac
...
...
@@ -117,7 +117,7 @@ struct _varobject {
};
// Pyston change: hacks to allow C++ features
#ifndef _
_cplusplus
#ifndef _
PYSTON_API
typedef
struct
_object
PyObject
;
typedef
struct
_varobject
PyVarObject
;
#define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
...
...
@@ -323,7 +323,7 @@ typedef struct {
// Pyston change: hacks to allow C++ features
#ifndef _
_cplusplus
#ifndef _
PYSTON_API
typedef
struct
_typeobject
PyTypeObject
;
#else
namespace
pyston
{
...
...
@@ -826,7 +826,7 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force) PYSTON_NOEXCEPT;
#define Py_INCREF(op) ((void)(op))
#define Py_DECREF(op) asm volatile("" : : "X"(op))
#define Py_DECREF(op)
__
asm volatile("" : : "X"(op))
/* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
* and tp_dealloc implementatons.
...
...
@@ -874,7 +874,7 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force) PYSTON_NOEXCEPT;
/* Macros to use in case the object pointer may be NULL: */
// Pyston change: made these noops as well
#define Py_XINCREF(op) ((void)(op))
#define Py_XDECREF(op) asm volatile("" : : "X"(op))
#define Py_XDECREF(op)
__
asm volatile("" : : "X"(op))
/*
These are provided as conveniences to Python runtime embedders, so that
...
...
from_cpython/Include/pyport.h
View file @
09b408ac
...
...
@@ -7,10 +7,21 @@
#include <stdint.h>
#ifdef __cplusplus
#if __cplusplus > 199711L
#define PYSTON_NOEXCEPT noexcept
#else
#define PYSTON_NOEXCEPT
#endif
#else
#define PYSTON_NOEXCEPT
#endif
// HACK: we should set this manually rather than cluing off of the C++ version
#ifdef __cplusplus
#if __cplusplus > 199711L
#define _PYSTON_API
#endif
#endif
#define Py_PROTO(x) x
...
...
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