Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: include/dart_api.h

Issue 11280241: Fix StringBase_createFromCodePoints to correctly accept Latin-1 characters (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/string.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 INCLUDE_DART_API_H_ 5 #ifndef INCLUDE_DART_API_H_
6 #define INCLUDE_DART_API_H_ 6 #define INCLUDE_DART_API_H_
7 7
8 /** \mainpage Dart Embedding API Reference 8 /** \mainpage Dart Embedding API Reference
9 * 9 *
10 * Dart is a class-based programming language for creating structured 10 * Dart is a class-based programming language for creating structured
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 */ 1418 */
1419 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object); 1419 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object);
1420 1420
1421 /** 1421 /**
1422 * Retrieves the peer pointer associated with an external String. 1422 * Retrieves the peer pointer associated with an external String.
1423 */ 1423 */
1424 DART_EXPORT Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle object, 1424 DART_EXPORT Dart_Handle Dart_ExternalStringGetPeer(Dart_Handle object,
1425 void** peer); 1425 void** peer);
1426 1426
1427 /** 1427 /**
1428 * Returns a String which references an external array of UTF-8 encoded 1428 * Returns a String which references an external array of
1429 * characters. 1429 * Latin-1 (ISO-8859-1) encoded characters.
1430 * 1430 *
1431 * \param utf8_array An array of UTF-8 encoded characters. This must not move. 1431 * \param latin1_array Array of Latin-1 encoded characters. This must not move.
1432 * \param length The length of the characters array. 1432 * \param length The length of the characters array.
1433 * \param peer An external pointer to associate with this string. 1433 * \param peer An external pointer to associate with this string.
1434 * \param cback A callback to be called when this string is finalized. 1434 * \param cback A callback to be called when this string is finalized.
1435 * 1435 *
1436 * \return The String object if no error occurs. Otherwise returns 1436 * \return The String object if no error occurs. Otherwise returns
1437 * an error handle. 1437 * an error handle.
1438 */ 1438 */
1439 DART_EXPORT Dart_Handle Dart_NewExternalUTF8String(const uint8_t* utf8_array, 1439 DART_EXPORT Dart_Handle Dart_NewExternalLatin1String(
1440 intptr_t length, 1440 const uint8_t* latin1_array,
1441 void* peer, 1441 intptr_t length,
1442 Dart_PeerFinalizer cback); 1442 void* peer,
1443 Dart_PeerFinalizer cback);
1443 1444
1444 /** 1445 /**
1445 * Returns a String which references an external array of UTF-16 encoded 1446 * Returns a String which references an external array of UTF-16 encoded
1446 * characters. 1447 * characters.
1447 * 1448 *
1448 * \param utf16_array An array of UTF-16 encoded characters. This must not move. 1449 * \param utf16_array An array of UTF-16 encoded characters. This must not move.
1449 * \param length The length of the characters array. 1450 * \param length The length of the characters array.
1450 * \param peer An external pointer to associate with this string. 1451 * \param peer An external pointer to associate with this string.
1451 * \param cback A callback to be called when this string is finalized. 1452 * \param cback A callback to be called when this string is finalized.
1452 * 1453 *
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
2780 * 2781 *
2781 * \param object An object. 2782 * \param object An object.
2782 * \param peer A value to store in the peer field. 2783 * \param peer A value to store in the peer field.
2783 * 2784 *
2784 * \return Returns an error if 'object' is a subtype of Null, num, or 2785 * \return Returns an error if 'object' is a subtype of Null, num, or
2785 * bool. 2786 * bool.
2786 */ 2787 */
2787 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); 2788 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer);
2788 2789
2789 #endif // INCLUDE_DART_API_H_ 2790 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | lib/string.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698