| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| #ifdef MS_WINDOWS | ||
| if (optname == SIO_TCP_SET_ACK_FREQUENCY) { | ||
| int dummy; | ||
| DWORD dummy; |
There was a problem hiding this comment.
fix warning : incompatible pointer types passing 'int *' to parameter of type 'LPDWORD' (aka 'unsigned long *') [-Wincompatible-pointer-types]
Sorry, something went wrong.
| PyThread_acquire_lock(netdb_lock, 1); | ||
| #endif | ||
| SUPPRESS_DEPRECATED_CALL | ||
| _Py_COMP_DIAG_PUSH |
There was a problem hiding this comment.
The rest of the PR cares about deprecation warnings like
..\Modules\socketmodule.c(6070,9): warning : 'gethostbyname' is deprecated: Use getaddrinfo() or GetAddrInfoW() instead or define _WINSOCK_DEPRECATED_NO_WARNINGS to disable deprecated API warnings [-Wdeprecated-declarations]
https://github.com/python/cpython/actions/runs/14044831663/job/39366560293?pr=131690#step:4:183
using the already existing infrastructure _Py_COMP_DIAG_PUSH et al. from pyport.h, because clang-cl unfortunately does not (yet) respect
# define SUPPRESS_DEPRECATED_CALL __pragma(warning(suppress: 4996))
Sorry, something went wrong.
There was a problem hiding this comment.
Is there another way to spell the pragma that will work? The idea of pyport.h is to deal with compiler differences as much as possible, so it's the place to handle it if the original macro can be made to work.
Sorry, something went wrong.
There was a problem hiding this comment.
clang-cl does not understand suppress, hence I need to push and pop and thus used the existing infrastructure from pyport.h (warning(disable: 4996))
Lines 308 to 311 in 0045100
Likewise, AFAIK, there is no supress in gcc / "regular" clang, so we need to always push / pop there.
Sorry, something went wrong.
|
I am pretty sure that failing of Ubuntu (free-threading) / build and test (ubuntu-24.04) (pull_request) is unrelated to the PR. |
Sorry, something went wrong.
Sorry, something went wrong.
|
@zooba May I ask you for a review? |
Sorry, something went wrong.
| _Py_COMP_DIAG_POP | ||
| #endif /* HAVE_GETHOSTBYNAME_R */ |
There was a problem hiding this comment.
nit: Two space indents of preprocessor directives might be uncommon in CPython except when a line starts with # .
Sorry, something went wrong.
There was a problem hiding this comment.
I indented everywhere by two spaces to easier spot the macros, but I will happily indent by four spaces if this is preferred.
Sorry, something went wrong.
There was a problem hiding this comment.
I'd prefer to avoid thinking of the intention when reading, so +1 for four spaces.
Sorry, something went wrong.
There was a problem hiding this comment.
Done. I had a look at the other occurrences in the code base: either no indentation or like the code they guard.
I switched to the latter.
Sorry, something went wrong.
|
LGTM. I'll merge after CI is done unless something else comes up (or if someone else sees this and can merge, go ahead) |
Sorry, something went wrong.
|
Thanks @chris-eibl for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Sorry, something went wrong.
…GH-131821) (cherry picked from commit cc8e6d2) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
|
GH-146339 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I think this is a skip news?