| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "bin/io_natives.h" | 5 #include "bin/io_natives.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "bin/builtin.h" | 10 #include "bin/builtin.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 V(Socket_Available, 1) \ | 41 V(Socket_Available, 1) \ |
| 42 V(Socket_Read, 2) \ | 42 V(Socket_Read, 2) \ |
| 43 V(Socket_ReadList, 4) \ | 43 V(Socket_ReadList, 4) \ |
| 44 V(Socket_WriteList, 4) \ | 44 V(Socket_WriteList, 4) \ |
| 45 V(Socket_GetPort, 1) \ | 45 V(Socket_GetPort, 1) \ |
| 46 V(Socket_GetRemotePeer, 1) \ | 46 V(Socket_GetRemotePeer, 1) \ |
| 47 V(Socket_GetError, 1) \ | 47 V(Socket_GetError, 1) \ |
| 48 V(Socket_GetStdioHandle, 2) \ | 48 V(Socket_GetStdioHandle, 2) \ |
| 49 V(Socket_NewServicePort, 0) \ | 49 V(Socket_NewServicePort, 0) \ |
| 50 V(Socket_GetType, 1) \ | 50 V(Socket_GetType, 1) \ |
| 51 V(Socket_SetOption, 3) \ |
| 51 V(SecureSocket_Connect, 8) \ | 52 V(SecureSocket_Connect, 8) \ |
| 52 V(SecureSocket_Destroy, 1) \ | 53 V(SecureSocket_Destroy, 1) \ |
| 53 V(SecureSocket_Handshake, 1) \ | 54 V(SecureSocket_Handshake, 1) \ |
| 54 V(SecureSocket_Init, 1) \ | 55 V(SecureSocket_Init, 1) \ |
| 55 V(SecureSocket_PeerCertificate, 1) \ | 56 V(SecureSocket_PeerCertificate, 1) \ |
| 56 V(SecureSocket_ProcessBuffer, 2) \ | 57 V(SecureSocket_ProcessBuffer, 2) \ |
| 57 V(SecureSocket_RegisterBadCertificateCallback, 2) \ | 58 V(SecureSocket_RegisterBadCertificateCallback, 2) \ |
| 58 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ | 59 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ |
| 59 V(SecureSocket_InitializeLibrary, 3) \ | 60 V(SecureSocket_InitializeLibrary, 3) \ |
| 60 V(StringToSystemEncoding, 1) \ | 61 V(StringToSystemEncoding, 1) \ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 81 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); | 82 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); |
| 82 for (int i = 0; i < num_entries; i++) { | 83 for (int i = 0; i < num_entries; i++) { |
| 83 struct NativeEntries* entry = &(IOEntries[i]); | 84 struct NativeEntries* entry = &(IOEntries[i]); |
| 84 if (!strcmp(function_name, entry->name_) && | 85 if (!strcmp(function_name, entry->name_) && |
| 85 (entry->argument_count_ == argument_count)) { | 86 (entry->argument_count_ == argument_count)) { |
| 86 return reinterpret_cast<Dart_NativeFunction>(entry->function_); | 87 return reinterpret_cast<Dart_NativeFunction>(entry->function_); |
| 87 } | 88 } |
| 88 } | 89 } |
| 89 return NULL; | 90 return NULL; |
| 90 } | 91 } |
| OLD | NEW |