8000 gh-132987: Support __index__() in the socket module by serhiy-storchaka · Pull Request #133093 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-132987: Support __index__() in the socket module #133093

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 1 commit
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
Prev Previous commit
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
serhiy-storchaka and vstinner authored Apr 29, 2025
commit e3b50fa3acebe7d48ab9e7b6a832e42d437325f7
4 changes: 2 additions & 2 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ find_module_state_by_def(PyTypeObject *type)
}

#define UNSIGNED_INT_CONVERTER(NAME, TYPE) \
int \
static int \
_PyLong_##NAME##_Converter(PyObject *obj, void *ptr) \
{ \
Py_ssize_t bytes = PyLong_AsNativeBytes(obj, ptr, sizeof(TYPE), \
Expand All @@ -632,7 +632,7 @@ _PyLong_##NAME##_Converter(PyObject *obj, void *ptr) \
} \
if ((size_t)bytes > sizeof(TYPE)) { \
PyErr_SetString(PyExc_OverflowError, \
"Python int too large for C "#TYPE); \
"Python int too large for C " #TYPE); \
return 0; \
} \
return 1; \
Expand Down
Loading
0