Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.14] GH-131296: Suppress clang-cl warnings in socketmodule.c (GH-131821)#146339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ambv merged 1 commit intopython:3.14frommiss-islington:backport-cc8e6d2-3.14
Mar 23, 2026
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletionsModules/socketmodule.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -716,12 +716,6 @@ select_error(void)
# define SOCK_INPROGRESS_ERR EINPROGRESS
#endif

#ifdef _MSC_VER
# define SUPPRESS_DEPRECATED_CALL __pragma(warning(suppress: 4996))
#else
# define SUPPRESS_DEPRECATED_CALL
#endif

/* Convenience function to raise an error according to errno
and return a NULL pointer from a function. */

Expand DownExpand Up@@ -3372,7 +3366,7 @@ sock_setsockopt(PyObject *self, PyObject *args)
&level, &optname, &flag)) {
#ifdef MS_WINDOWS
if (optname == SIO_TCP_SET_ACK_FREQUENCY) {
int dummy;
DWORD dummy;
res = WSAIoctl(get_sock_fd(s), SIO_TCP_SET_ACK_FREQUENCY, &flag,
sizeof(flag), NULL, 0, &dummy, NULL, NULL);
if (res >= 0) {
Expand DownExpand Up@@ -6205,8 +6199,10 @@ socket_gethostbyname_ex(PyObject *self, PyObject *args)
#ifdef USE_GETHOSTBYNAME_LOCK
PyThread_acquire_lock(netdb_lock, 1);
#endif
SUPPRESS_DEPRECATED_CALL
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
h = gethostbyname(name);
_Py_COMP_DIAG_POP
#endif /* HAVE_GETHOSTBYNAME_R */
Py_END_ALLOW_THREADS
/* Some C libraries would require addr.__ss_family instead of
Expand DownExpand Up@@ -6310,8 +6306,10 @@ socket_gethostbyaddr(PyObject *self, PyObject *args)
#ifdef USE_GETHOSTBYNAME_LOCK
PyThread_acquire_lock(netdb_lock, 1);
#endif
SUPPRESS_DEPRECATED_CALL
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
h = gethostbyaddr(ap, al, af);
_Py_COMP_DIAG_POP
#endif /* HAVE_GETHOSTBYNAME_R */
Py_END_ALLOW_THREADS
ret = gethost_common(state, h, SAS2SA(&addr), sizeof(addr), af);
Expand DownExpand Up@@ -6728,8 +6726,10 @@ _socket_inet_aton_impl(PyObject *module, const char *ip_addr)
packed_addr = INADDR_BROADCAST;
} else {

SUPPRESS_DEPRECATED_CALL
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
packed_addr = inet_addr(ip_addr);
_Py_COMP_DIAG_POP

if (packed_addr == INADDR_NONE) { /* invalid address */
PyErr_SetString(PyExc_OSError,
Expand DownExpand Up@@ -6772,8 +6772,10 @@ _socket_inet_ntoa_impl(PyObject *module, Py_buffer *packed_ip)
memcpy(&packed_addr, packed_ip->buf, packed_ip->len);
PyBuffer_Release(packed_ip);

SUPPRESS_DEPRECATED_CALL
_Py_COMP_DIAG_PUSH
_Py_COMP_DIAG_IGNORE_DEPR_DECLS
return PyUnicode_FromString(inet_ntoa(packed_addr));
_Py_COMP_DIAG_POP
}
#endif // HAVE_INET_NTOA

Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp