| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 * | 755 * |
| 756 * \param value An array of 32-bit codepoints. | 756 * \param value An array of 32-bit codepoints. |
| 757 * \param length The length of the codepoints array. | 757 * \param length The length of the codepoints array. |
| 758 * | 758 * |
| 759 * \return The String object if no error occurs. Otherwise returns | 759 * \return The String object if no error occurs. Otherwise returns |
| 760 * an error handle. | 760 * an error handle. |
| 761 */ | 761 */ |
| 762 DART_EXPORT Dart_Handle Dart_NewString32(const uint32_t* codepoints, | 762 DART_EXPORT Dart_Handle Dart_NewString32(const uint32_t* codepoints, |
| 763 intptr_t length); | 763 intptr_t length); |
| 764 | 764 |
| 765 |
| 766 typedef void (*Dart_PeerFinalizer)(void* peer); |
| 767 |
| 768 DART_EXPORT Dart_Handle Dart_NewExternalString8(const uint8_t* codepoints, |
| 769 intptr_t length, |
| 770 void* peer, |
| 771 Dart_PeerFinalizer callback); |
| 772 |
| 773 DART_EXPORT Dart_Handle Dart_NewExternalString16(const uint16_t* codepoints, |
| 774 intptr_t length, |
| 775 void* peer, |
| 776 Dart_PeerFinalizer callback); |
| 777 |
| 778 DART_EXPORT Dart_Handle Dart_NewExternalString32(const uint32_t* codepoints, |
| 779 intptr_t length, |
| 780 void* peer, |
| 781 Dart_PeerFinalizer callback); |
| 782 |
| 765 /** | 783 /** |
| 766 * Gets the codepoints from a String. | 784 * Gets the codepoints from a String. |
| 767 * | 785 * |
| 768 * This function is only valid on strings for which Dart_IsString8 is | 786 * This function is only valid on strings for which Dart_IsString8 is |
| 769 * true. Otherwise an error occurs. | 787 * true. Otherwise an error occurs. |
| 770 * | 788 * |
| 771 * \param str A string. | 789 * \param str A string. |
| 772 * \param codepoints An array allocated by the caller, used to return | 790 * \param codepoints An array allocated by the caller, used to return |
| 773 * the array of codepoints. | 791 * the array of codepoints. |
| 774 * \param length Used to pass in the length of the provided array. | 792 * \param length Used to pass in the length of the provided array. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1180 | 1198 |
| 1181 // --- Profiling support ---- | 1199 // --- Profiling support ---- |
| 1182 | 1200 |
| 1183 // External pprof support for gathering and dumping symbolic | 1201 // External pprof support for gathering and dumping symbolic |
| 1184 // information that can be used for better profile reports for | 1202 // information that can be used for better profile reports for |
| 1185 // dynamically generated code. | 1203 // dynamically generated code. |
| 1186 DART_EXPORT void Dart_InitPprofSupport(); | 1204 DART_EXPORT void Dart_InitPprofSupport(); |
| 1187 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); | 1205 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| 1188 | 1206 |
| 1189 #endif // INCLUDE_DART_API_H_ | 1207 #endif // INCLUDE_DART_API_H_ |
| OLD | NEW |