Changeset 21401 for lang/cplusplus/llv8call
- Timestamp:
- 10/16/08 08:43:46 (5 years ago)
- Location:
- lang/cplusplus/llv8call/trunk
- Files:
-
- 2 modified
-
ext/socket/socket.cc (modified) (1 diff)
-
t/100_socket/08_gethostbyname.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
lang/cplusplus/llv8call/trunk/ext/socket/socket.cc
r21397 r21401 281 281 struct hostent * ent = gethostbyname(*hostname); 282 282 if (ent) { 283 if (ent->h_length) { 284 return String::New( ent->h_addr_list[0] ); 283 if (ent->h_addr_list[0] != NULL) { 284 struct in_addr * addr = (in_addr*)ent->h_addr_list[0]; 285 return String::New( inet_ntoa(*addr) ); 285 286 } else { 286 287 return Undefined(); -
lang/cplusplus/llv8call/trunk/t/100_socket/08_gethostbyname.js
r21397 r21401 5 5 check_lib("org.coderepos.socket", 'Socket'); 6 6 7 is(Socket.gethostbyname(' localhost'), '127.0.0.1');7 is(Socket.gethostbyname('example.com'), '208.77.188.166'); 8 8
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)