From cb4f7462d122d7ec9dd9d909014c548a0b945028 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Fri, 20 Oct 2023 19:39:45 +0300 Subject: [PATCH] gh-110093: Partially revert previous change in socketmodule.c (GH-111120) --- Modules/socketmodule.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 5064aa28d61234..3d099d41d1e761 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -1489,7 +1489,9 @@ makesockaddr(SOCKET_T sockfd, struct sockaddr *addr, size_t addrlen, int proto) #if defined(__NetBSD__) || defined(__DragonFly__) return makebdaddr(&_BT_HCI_MEMB(a, bdaddr)); #else /* __NetBSD__ || __DragonFly__ */ - return PyLong_FromLong(_BT_HCI_MEMB(a, dev)); + PyObject *ret = NULL; + ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev)); + return ret; #endif /* !(__NetBSD__ || __DragonFly__) */ }