Chromium Code Reviews| Index: include/dart_api.h |
| =================================================================== |
| --- include/dart_api.h (revision 16135) |
| +++ include/dart_api.h (working copy) |
| @@ -1463,6 +1463,22 @@ |
| const char** cstr); |
| /** |
| + * Gets the Latin-1 (ISO-8859-1) encoded representation of a string. |
|
cshapiro
2012/12/14 00:00:36
This seems misleading, I would really like to see
siva
2012/12/14 03:30:09
I have changed the description here to word it to
|
| + * |
| + * \param str A string. |
| + * \param latin1_array Returns the String represented as Latin-1 characters |
| + * This array is scope allocated and is only valid |
| + * until the next call to Dart_ExitScope. |
|
antonm
2012/12/14 01:31:59
there are two flavours of string data fetching: Da
siva
2012/12/14 03:30:09
I have changed Dart_StringToLatin1 to use the API
antonm
2012/12/14 03:31:30
Thanks!
On 2012/12/14 03:30:09, siva wrote:
|
| + * \param length Used to return the length of the array which was |
| + * actually used. |
| + * |
| + * \return A valid handle if no error occurs during the operation. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_StringToLatin1(Dart_Handle str, |
| + uint8_t** latin1_array, |
| + intptr_t* length); |
| + |
| +/** |
| * Gets a UTF-8 encoded representation of a String. |
| * |
| * \param str A string. |
| @@ -1517,6 +1533,9 @@ |
| * |
| * \return the converted ExternalString object if no error occurs. |
| * Otherwise returns an error handle. |
| + * If the object is a valid string but if it cannot be externalized |
| + * then Dart_Null() is returned and the string data is copied into |
| + * the external space specified. |
| * |
| * For example: |
| * intptr_t size; |