Skip to content

Commit 3f48559

Browse files
author
Franziska Geiger
committed
[GR-16418] Added missing exception type and moved polyglot.h dependency
PullRequest: graalpython/538
2 parents db8eac0 + 49cbc42 commit 3f48559

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

graalpython/com.oracle.graal.python.cext/include/Python.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
#define PYPY_VERSION_NUM 0
5252

5353
#include <truffle.h>
54-
#include <polyglot.h>
5554
#include <stdio.h>
5655
#include <string.h>
5756
#include <errno.h>

graalpython/com.oracle.graal.python.cext/src/capi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
#define MUST_INLINE __attribute__((always_inline)) inline
4545

46+
#include "polyglot.h"
4647
#include "Python.h"
4748

4849
#define SRC_CS "utf-8"

graalpython/com.oracle.graal.python.cext/src/exceptions.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ PyObject * PyExc_RuntimeWarning = NULL;
6969
PyObject * PyExc_FutureWarning = NULL;
7070
PyObject * PyExc_PendingDeprecationWarning = NULL;
7171
PyObject * PyExc_SyntaxWarning = NULL;
72+
PyObject * PyExc_SyntaxError = NULL;
7273
PyObject * PyExc_ImportWarning = NULL;
7374
PyObject * PyExc_UnicodeWarning = NULL;
7475
PyObject * PyExc_BytesWarning = NULL;
@@ -107,6 +108,7 @@ void initialize_exceptions() {
107108
PyExc_RuntimeError = PY_EXCEPTION("RuntimeError");
108109
PyExc_RuntimeWarning = PY_EXCEPTION("RuntimeWarning");
109110
PyExc_SyntaxWarning = PY_EXCEPTION("SyntaxWarning");
111+
PyExc_SyntaxError = PY_EXCEPTION("SyntaxError");
110112
PyExc_SystemError = PY_EXCEPTION("SystemError");
111113
PyExc_TypeError = PY_EXCEPTION("TypeError");
112114
PyExc_UnicodeWarning = PY_EXCEPTION("UnicodeWarning");

0 commit comments

Comments
 (0)