Commit 6c6e8882 authored by Boxiang Sun's avatar Boxiang Sun

Add PYSTON_CONST macro

For some struct member in Pyston itself, add `const` qualifier,
for exenstion, do not add `const` for compatibility reason.
parent 4ddb6e42
......@@ -190,8 +190,7 @@ typedef struct bufferinfo {
pointed to by strides in simple case.*/
int readonly;
int ndim;
// Pyston change: changed this from char* to const char*
const char *format;
PYSTON_CONST char *format;
Py_ssize_t *shape;
Py_ssize_t *strides;
Py_ssize_t *suboffsets;
......
......@@ -16,6 +16,12 @@
#define PYSTON_NOEXCEPT
#endif
#ifdef _PYSTON_API
#define PYSTON_CONST const
#else
#define PYSTON_CONST
#endif
#define Py_PROTO(x) x
// Pyston change: these are just hard-coded for now:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment