Skip to content

Commit 40879c7

Browse files
Merge branch 'pythongh-92210' of github.com:zitterbewegung/cpython into pythongh-92210
2 parents 0494f1a + a39f1e8 commit 40879c7

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
OPort of Cinder's ``socket.__init__`` which uses Argument Clinic to CPython.
1+
Port ``socket.__init__`` to Argument Clinic. Patch by Cinder.

Modules/clinic/socketmodule.c.h

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/socketmodule.c

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -329,14 +329,10 @@ static FlagRuntimeInfo win_runtime_flags[] = {
329329
};
330330

331331
/*[clinic input]
332-
module _socket
333-
[clinic start generated code]*/
334-
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=4a04c1cd4d2530a1]*/
335-
336-
/*[clinic input]
337-
class _socket.socket "PySocketSockObject *" "&sock_type"
338-
[clinic start generated code]*/
339-
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3e0d64ca2c658496]*/
332+
module _socket
333+
class _socket.socket "PySocketSockObject *" "&sock_type"
334+
[clinic start generated code]*/
335+
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=7a8313d9b7f51988]*/
340336

341337
static int
342338
remove_unusable_flags(PyObject *m)
@@ -1720,7 +1716,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
17201716
}
17211717
addr->sun_family = s->sock_family;
17221718
memcpy(addr->sun_path, path.buf, path.len);
1723-
1719+
17241720
retval = 1;
17251721
unix_out:
17261722
PyBuffer_Release(&path);
@@ -5117,17 +5113,17 @@ static int sock_cloexec_works = -1;
51175113
/*ARGSUSED*/
51185114

51195115
/*[clinic input]
5120-
_socket.socket.__init__
5116+
_socket.socket.__init__ as sock_initobj
51215117
family: int = -1
51225118
type: int = -1
51235119
proto: int = -1
51245120
fileno as fdobj: object = NULL
51255121
[clinic start generated code]*/
51265122

51275123
static int
5128-
_socket_socket___init___impl(PySocketSockObject *self, int family, int type,
5129-
int proto, PyObject *fdobj)
5130-
/*[clinic end generated code: output=8d20ec7eb58df701 input=c0966eb4587c4634]*/
5124+
sock_initobj_impl(PySocketSockObject *self, int family, int type, int proto,
5125+
PyObject *fdobj)
5126+
/*[clinic end generated code: output=d114d026b9a9a810 input=04cfc32953f5cc25]*/
51315127
{
51325128

51335129
SOCKET_T fd = INVALID_SOCKET;
@@ -5382,7 +5378,7 @@ static PyTypeObject sock_type = {
53825378
0, /* tp_descr_get */
53835379
0, /* tp_descr_set */
53845380
0, /* tp_dictoffset */
5385-
_socket_socket___init__, /* tp_init */
5381+
sock_initobj, /* tp_init */
53865382
PyType_GenericAlloc, /* tp_alloc */
53875383
sock_new, /* tp_new */
53885384
PyObject_Del, /* tp_free */

0 commit comments

Comments
 (0)