Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1246 * Get the ExternalAsciiStringResource for an external ASCII string. | 1246 * Get the ExternalAsciiStringResource for an external ASCII string. |
| 1247 * Returns NULL if IsExternalAscii() doesn't return true. | 1247 * Returns NULL if IsExternalAscii() doesn't return true. |
| 1248 */ | 1248 */ |
| 1249 V8EXPORT const ExternalAsciiStringResource* GetExternalAsciiStringResource() | 1249 V8EXPORT const ExternalAsciiStringResource* GetExternalAsciiStringResource() |
| 1250 const; | 1250 const; |
| 1251 | 1251 |
| 1252 V8_INLINE(static String* Cast(v8::Value* obj)); | 1252 V8_INLINE(static String* Cast(v8::Value* obj)); |
| 1253 | 1253 |
| 1254 /** | 1254 /** |
| 1255 * Allocates a new string from either UTF-8 encoded or ASCII data. | 1255 * Allocates a new string from either UTF-8 encoded or ASCII data. |
| 1256 * The second parameter 'length' gives the buffer length. | 1256 * The second parameter 'length' gives the buffer length. If omitted, |
| 1257 * If the data is UTF-8 encoded, the caller must | 1257 * the function calls 'strlen' to determine the buffer length. |
| 1258 * be careful to supply the length parameter. | |
| 1259 * If it is not given, the function calls | |
| 1260 * 'strlen' to determine the buffer length, it might be | |
| 1261 * wrong if 'data' contains a null character. | |
|
bnoordhuis1
2012/12/06 03:59:55
The original author may have been thinking of UTF-
| |
| 1262 */ | 1258 */ |
| 1263 V8EXPORT static Local<String> New(const char* data, int length = -1); | 1259 V8EXPORT static Local<String> New(const char* data, int length = -1); |
| 1264 | 1260 |
| 1265 /** Allocates a new string from 16-bit character codes.*/ | 1261 /** Allocates a new string from 16-bit character codes.*/ |
| 1266 V8EXPORT static Local<String> New(const uint16_t* data, int length = -1); | 1262 V8EXPORT static Local<String> New(const uint16_t* data, int length = -1); |
| 1267 | 1263 |
| 1268 /** Creates a symbol. Returns one if it exists already.*/ | 1264 /** Creates a symbol. Returns one if it exists already.*/ |
| 1269 V8EXPORT static Local<String> NewSymbol(const char* data, int length = -1); | 1265 V8EXPORT static Local<String> NewSymbol(const char* data, int length = -1); |
| 1270 | 1266 |
| 1271 /** | 1267 /** |
| (...skipping 3597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4869 | 4865 |
| 4870 | 4866 |
| 4871 } // namespace v8 | 4867 } // namespace v8 |
| 4872 | 4868 |
| 4873 | 4869 |
| 4874 #undef V8EXPORT | 4870 #undef V8EXPORT |
| 4875 #undef TYPE_CHECK | 4871 #undef TYPE_CHECK |
| 4876 | 4872 |
| 4877 | 4873 |
| 4878 #endif // V8_H_ | 4874 #endif // V8_H_ |
| OLD | NEW |