Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add _PyInterpreterID_Type and helpers to public API.
  • Loading branch information
ericsnowcurrently committed Mar 1, 2019
commit 892ea20bcdc19786151ff874010389e7263519b3
13 changes: 13 additions & 0 deletions Include/cpython/interpreteridobject.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef Py_CPYTHON_INTERPRETERIDOBJECT_H
# error "this header file must not be included directly"
#endif

/* Interpreter ID Object */
Comment thread
ericsnowcurrently marked this conversation as resolved.
Outdated

PyAPI_DATA(PyTypeObject) _PyInterpreterID_Type;

PyAPI_FUNC(PyObject *) _PyInterpreterID_New(int64_t);
PyAPI_FUNC(PyObject *) _PyInterpreterState_GetIDObject(PyInterpreterState *);
PyAPI_FUNC(PyInterpreterState *) _PyInterpreterID_LookUp(PyObject *);

PyAPI_FUNC(int64_t) _Py_CoerceID(PyObject *);
17 changes: 17 additions & 0 deletions Include/interpreteridobject.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#ifndef Py_INTERPRETERIDOBJECT_H
#define Py_INTERPRETERIDOBJECT_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef Py_LIMITED_API
# define Py_CPYTHON_INTERPRETERIDOBJECT_H
# include "cpython/interpreteridobject.h"
# undef Py_CPYTHON_INTERPRETERIDOBJECT_H
#endif

#ifdef __cplusplus
}
#endif
#endif /* !Py_INTERPRETERIDOBJECT_H */
1 change: 1 addition & 0 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ OBJECT_OBJS= \
Objects/floatobject.o \
Objects/frameobject.o \
Objects/funcobject.o \
Objects/interpreteridobject.o \
Objects/iterobject.o \
Objects/listobject.o \
Objects/longobject.o \
Expand Down
Loading