Chromium Code Reviews| Index: include/dart_api.h |
| =================================================================== |
| --- include/dart_api.h (revision 14937) |
| +++ include/dart_api.h (working copy) |
| @@ -1484,7 +1484,37 @@ |
| uint16_t* utf16_array, |
| intptr_t* length); |
| +/** |
| + * Gets the storage size in bytes of a String. |
| + * |
| + * \param str A String. |
| + * \param length Returns the storage size in bytes of the String. |
| + * |
| + * \return A valid handle if no error occurs during the operation. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_StringStorageSize(Dart_Handle str, intptr_t* size); |
|
Ivan Posva
2012/11/15 06:17:15
I read the description and it is not clear to me w
siva
2012/11/15 21:34:13
Added comments to both Dart_StringStorageSize and
|
| + |
| +/** |
| + * Converts a String into an ExternalString. |
| + * The original object is morphed into an external string object. |
| + * |
| + * \param array External space into which the string data will be |
| + * copied into. This must not move. |
| + * \param length The size in bytes of the provided external space (array). |
| + * \param peer An external pointer to associate with this string. |
| + * \param cback A callback to be called when this string is finalized. |
| + * |
| + * \return the converted ExternalString object if no error occurs. |
| + * Otherwise returns an error handle. |
| + */ |
| +DART_EXPORT Dart_Handle Dart_MakeExternalString(Dart_Handle str, |
| + void* array, |
| + intptr_t length, |
| + void* peer, |
| + Dart_PeerFinalizer cback); |
| + |
| + |
| // --- Lists --- |
| /** |