| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef BIN_UTILS_H_ | 5 #ifndef BIN_UTILS_H_ |
| 6 #define BIN_UTILS_H_ | 6 #define BIN_UTILS_H_ |
| 7 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 } | 46 } |
| 47 | 47 |
| 48 SubSystem sub_system_; | 48 SubSystem sub_system_; |
| 49 int code_; | 49 int code_; |
| 50 char* message_; | 50 char* message_; |
| 51 | 51 |
| 52 DISALLOW_COPY_AND_ASSIGN(OSError); | 52 DISALLOW_COPY_AND_ASSIGN(OSError); |
| 53 }; | 53 }; |
| 54 | 54 |
| 55 class StringUtils { |
| 56 public: |
| 57 // The following methods convert the argument if needed. The |
| 58 // conversions are only needed on Windows. If the methods returns a |
| 59 // pointer that is different from the input pointer the returned |
| 60 // pointer is allocated with malloc and should be freed using free. |
| 61 static const char* SystemStringToUtf8(const char* str); |
| 62 static char* SystemStringToUtf8(char* str); |
| 63 static const char* Utf8ToSystemString(const char* utf8); |
| 64 static char* Utf8ToSystemString(char* utf8); |
| 65 }; |
| 66 |
| 55 #endif // BIN_UTILS_H_ | 67 #endif // BIN_UTILS_H_ |
| OLD | NEW |