[#3006] mismatched quotation — "stevan apter" <apter@...>

ruby documentation uses a punctuation convention i've never seen

13 messages 2000/05/27

[ruby-talk:02976] Re: Socket.getnameinfo

From: Dave Thomas <Dave@...>
Date: 2000-05-25 07:05:44 UTC
List: ruby-talk #2976
ts <decoux@moulon.inra.fr> writes:

> >>>>> "D" == Dave Thomas <Dave@thomases.com> writes:
> 
> D> OK - now I'm confused even more. Is this implying I need to pass a
> D> port number in as a string? I tried that, but got
> 
>  No, ruby always call getaddrinfo with hints->ai_socktype == 0
>  see ext/socket/socket.c
> 
> 	MEMZERO(&hints, struct addrinfo, 1);
> 	if (strcmp(STR2CSTR(af), "AF_INET") == 0) {
> 	    hints.ai_family = PF_INET;
> 	}
> #ifdef INET6
> 	else if (strcmp(STR2CSTR(af), "AF_INET6") == 0) {
> 	    hints.ai_family = PF_INET6;
> 	}
> #endif
> 	else {
> 	    hints.ai_family = PF_UNSPEC;
> 	}
> 	error = getaddrinfo(hptr, pptr, &hints, &res);

So when I document the call, I should say that the only value allowed
for the service parameter is nil?

In This Thread