[doc] Fix copy & paste mistake in gethostbyname_ex#28700
Conversation
|
Thanks @andresdelfino for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10. |
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't. (cherry picked from commit 4103280) Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
GH-28742 is a backport of this pull request to the 3.10 branch. |
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't. (cherry picked from commit 4103280) Co-authored-by: Andre Delfino <adelfino@gmail.com>
|
GH-28743 is a backport of this pull request to the 3.9 branch. |
|
Thanks for the fix, @andresdelfino. The returned hostname is the primary hostname of the given host. This means it's the same as the given hostname if there are no aliases: In case aliases exist and you passed one of them to the function, the returned primary hostname can be different: |
It seems part of `gethostbyname_ex` doc was copied from `gethostbyaddr`. The latter has an `ip_address` parameter whereas the former doesn't. (cherry picked from commit 4103280) Co-authored-by: Andre Delfino <adelfino@gmail.com> Co-authored-by: Andre Delfino <adelfino@gmail.com>
Thanks for the explanation! |
It seems part of gethostbyname_ex doc was copied from gethostbyaddr (which has an ip_address parameter).
Not sure if the proposed wording is correct, though, as it not clear to me what is going on with the hostname returned. Not sure if it's exactly the hostname passed as argument. Tried to read the C, but, yeah..