gh-110093: Replace trivial Py_BuildValue() with direct C API call (GH-110094)

This commit is contained in:
Serhiy Storchaka 2023-10-20 18:08:41 +03:00 committed by GitHub
parent ff4e53cb74
commit 59ea0f523e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 33 additions and 32 deletions

View file

@ -1489,9 +1489,7 @@ 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__ */
PyObject *ret = NULL;
ret = Py_BuildValue("i", _BT_HCI_MEMB(a, dev));
return ret;
return PyLong_FromLong(_BT_HCI_MEMB(a, dev));
#endif /* !(__NetBSD__ || __DragonFly__) */
}