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

Commit49cf089

Browse files
korliencukou
andauthored
Modules/socketmodule.c: better comment for internal_connect
Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent1af62db commit49cf089

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎Modules/socketmodule.c‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3405,7 +3405,18 @@ sock_connect_impl(PySocketSockObject *s, void* Py_UNUSED(data))
34053405
return1;
34063406
}
34073407

3408-
/* Returns 0 on success, -1 with exception set on failure, or error code if not. */
3408+
/* Common functionality for socket.connect and socket.connect_ex.
3409+
*
3410+
* If *raise* is set:
3411+
* - On success, return 0.
3412+
* - On any failure, return -1 with an exception set.
3413+
* If *raise* is zero:
3414+
* - On success, return 0.
3415+
* - On connect() failure, return errno (without an exception set)
3416+
* - On other error, return -1 with an exception set.
3417+
*
3418+
* Note that -1 is a valid errno value on some systems.
3419+
*/
34093420
staticint
34103421
internal_connect(PySocketSockObject*s,structsockaddr*addr,intaddrlen,
34113422
intraise)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp