Skip to content

Commit

Permalink
Get rid of borrowed global singletons.
Browse files Browse the repository at this point in the history
Summary:
Add a PyAPI declaration to the objects we need and remove the borrows from them
and their dependencies.

Also remove the initialisations in `init_upstream_borrow()`; this is now an
empty function retained to avoid `#ifdef`ing it out in cinder code.

Reviewed By: itamaro

Differential Revision: D65372443

fbshipit-source-id: a216a6c75807bf1abe55eb068ebba0523b934542
  • Loading branch information
Martin DeMello authored and facebook-github-bot committed Nov 2, 2024
1 parent 2561662 commit 5ffad1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Include/internal/pycore_unionobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extern "C" {
# error "this header requires Py_BUILD_CORE define"
#endif

extern PyTypeObject _PyUnion_Type;
PyAPI_DATA(PyTypeObject) _PyUnion_Type;
#define _PyUnion_Check(op) Py_IS_TYPE((op), &_PyUnion_Type)
PyAPI_FUNC(PyObject *) _Py_union_type_or(PyObject *, PyObject *);

Expand Down

0 comments on commit 5ffad1a

Please sign in to comment.