Skip to content

Commit

Permalink
Python3: Stop using undocumented PyLong_AS_LONG.
Browse files Browse the repository at this point in the history
Fixes #125

Because it was just an alias for the documented API, there should be no repercussions. The exception (and the reason for this issue in the first place) is if something both includes 'cPersistence.h' and also defines their own INT_AS_LONG macro. If the definitions differ, the compiler might now emit a warning. I saw that in BTrees https://github.com/zopefoundation/BTrees/pull/122/files#diff-277c29c35c8feb60719e5ec94a3fe72e
  • Loading branch information
jamadden committed Feb 20, 2020
1 parent a6a18ea commit e165124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion persistent/_compat.h
Expand Up @@ -31,7 +31,7 @@

#define INT_FROM_LONG(x) PyLong_FromLong(x)
#define INT_CHECK(x) PyLong_Check(x)
#define INT_AS_LONG(x) PyLong_AS_LONG(x)
#define INT_AS_LONG(x) PyLong_AsLong(x)
#define CAPI_CAPSULE_NAME "persistent.cPersistence.CAPI"

#else
Expand Down

0 comments on commit e165124

Please sign in to comment.