Skip to content

Commit

Permalink
fix: remove '#else' and following Py2 definitions
Browse files Browse the repository at this point in the history
The '#else' would've actually bound to the '#ifndef' at the top of
the module, resulting in breakage if the header ever got included
multiple times.
  • Loading branch information
tseaver committed May 29, 2024
1 parent 6141646 commit 30635f9
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/persistent/_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,4 @@
#define INT_AS_LONG(x) PyLong_AsLong(x)
#define CAPI_CAPSULE_NAME "persistent.cPersistence.CAPI"

#else
#define INTERN PyString_InternFromString
#define INTERN_INPLACE PyString_InternInPlace
#define NATIVE_CHECK_EXACT PyString_CheckExact
#define NATIVE_FROM_STRING_AND_SIZE PyString_FromStringAndSize

#define INT_FROM_LONG(x) PyInt_FromLong(x)
#define INT_CHECK(x) PyInt_Check(x)
#define INT_AS_LONG(x) PyInt_AS_LONG(x)

#endif

0 comments on commit 30635f9

Please sign in to comment.