| OLD | NEW |
| 1 // Copyright (c) 2012, 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" |
| 11 #include "bin/dartutils.h" | 11 #include "bin/dartutils.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 35 V(Socket_CreateConnect, 3) \ | 35 V(Socket_CreateConnect, 3) \ |
| 36 V(Socket_Available, 1) \ | 36 V(Socket_Available, 1) \ |
| 37 V(Socket_Read, 2) \ | 37 V(Socket_Read, 2) \ |
| 38 V(Socket_ReadList, 4) \ | 38 V(Socket_ReadList, 4) \ |
| 39 V(Socket_WriteList, 4) \ | 39 V(Socket_WriteList, 4) \ |
| 40 V(Socket_GetPort, 1) \ | 40 V(Socket_GetPort, 1) \ |
| 41 V(Socket_GetRemotePeer, 1) \ | 41 V(Socket_GetRemotePeer, 1) \ |
| 42 V(Socket_GetError, 1) \ | 42 V(Socket_GetError, 1) \ |
| 43 V(Socket_GetStdioHandle, 2) \ | 43 V(Socket_GetStdioHandle, 2) \ |
| 44 V(Socket_NewServicePort, 0) \ | 44 V(Socket_NewServicePort, 0) \ |
| 45 V(Socket_GetType, 1) \ |
| 45 V(SecureSocket_Connect, 8) \ | 46 V(SecureSocket_Connect, 8) \ |
| 46 V(SecureSocket_Destroy, 1) \ | 47 V(SecureSocket_Destroy, 1) \ |
| 47 V(SecureSocket_Handshake, 1) \ | 48 V(SecureSocket_Handshake, 1) \ |
| 48 V(SecureSocket_Init, 1) \ | 49 V(SecureSocket_Init, 1) \ |
| 49 V(SecureSocket_PeerCertificate, 1) \ | 50 V(SecureSocket_PeerCertificate, 1) \ |
| 50 V(SecureSocket_ProcessBuffer, 2) \ | 51 V(SecureSocket_ProcessBuffer, 2) \ |
| 51 V(SecureSocket_RegisterBadCertificateCallback, 2) \ | 52 V(SecureSocket_RegisterBadCertificateCallback, 2) \ |
| 52 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ | 53 V(SecureSocket_RegisterHandshakeCompleteCallback, 2) \ |
| 53 V(SecureSocket_InitializeLibrary, 3) \ | 54 V(SecureSocket_InitializeLibrary, 3) \ |
| 54 V(SystemEncodingToString, 1) \ | 55 V(SystemEncodingToString, 1) \ |
| (...skipping 20 matching lines...) Expand all Loading... |
| 75 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); | 76 int num_entries = sizeof(IOEntries) / sizeof(struct NativeEntries); |
| 76 for (int i = 0; i < num_entries; i++) { | 77 for (int i = 0; i < num_entries; i++) { |
| 77 struct NativeEntries* entry = &(IOEntries[i]); | 78 struct NativeEntries* entry = &(IOEntries[i]); |
| 78 if (!strcmp(function_name, entry->name_) && | 79 if (!strcmp(function_name, entry->name_) && |
| 79 (entry->argument_count_ == argument_count)) { | 80 (entry->argument_count_ == argument_count)) { |
| 80 return reinterpret_cast<Dart_NativeFunction>(entry->function_); | 81 return reinterpret_cast<Dart_NativeFunction>(entry->function_); |
| 81 } | 82 } |
| 82 } | 83 } |
| 83 return NULL; | 84 return NULL; |
| 84 } | 85 } |
| OLD | NEW |