Skip to content

Commit caa0769

Browse files
committed
Introduce GraalPyObject with id field
1 parent 825e87f commit caa0769

File tree

3 files changed

+7
-0
lines changed
  • graalpython

3 files changed

+7
-0
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,11 @@ typedef struct {
105105

106106
typedef struct {
107107
PyObject_VAR_HEAD
108+
int32_t id;
109+
} GraalPyObject;
110+
111+
typedef struct {
112+
GraalPyObject ob_base;
108113
PyObject **ob_item;
109114
} GraalPyVarObject;
110115

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/structs/CFields.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public enum CFields {
116116

117117
PyVarObject__ob_size(Py_ssize_t),
118118

119+
GraalPyObject__id(Int),
119120
GraalPyVarObject__ob_item(PyObjectPtr),
120121

121122
PyModuleDef__m_name(ConstCharPtr),

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/structs/CStructs.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public enum CStructs {
5353
PyModuleDef_Slot,
5454
PyMethodDef,
5555
PyObject,
56+
GraalPyObject,
5657
PyBytesObject,
5758
PyByteArrayObject,
5859
PyListObject,

0 commit comments

Comments
 (0)