bindings: python: replace PyModule_AddObjectRef() with PyModule_AddObject()
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 9 Oct 2023 19:02:52 +0000 (21:02 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 11 Oct 2023 08:02:09 +0000 (10:02 +0200)
commitb436d05809b17ed734d08a36a8913eb687506433
tree51d6b404dc2eb090ca9b205620c77d9a86bb0fc4
parentacebcf2cbefb735eaddc06ee52eb1b1c85886d1b
bindings: python: replace PyModule_AddObjectRef() with PyModule_AddObject()

PyModule_AddObjectRef() was added in cpython v3.10 while libgpiod claims
to depend on python v3.9. Replace it with an older variant that steals the
reference to the added object on success.

Reported-by: Phil Howard <phil@gadgetoid.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/python/gpiod/ext/module.c