Skip to content

Commit 05e7c90

Browse files
committed
Error out if _Py_OPAQUE_PYOBJECT is defined by user
1 parent c477a14 commit 05e7c90

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Include/pyabi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@
5858
# undef Py_LIMITED_API
5959
# define Py_LIMITED_API Py_TARGET_ABI3T
6060
# endif
61+
#else
62+
# ifdef _Py_OPAQUE_PYOBJECT
63+
// _Py_OPAQUE_PYOBJECT is a private macro; do not define it directly.
64+
# error "Define Py_TARGET_ABI3T to target abi3t."
65+
# endif
6166
#endif
6267

6368
#if defined(Py_TARGET_ABI3T)

0 commit comments

Comments
 (0)