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

Side by Side Diff: runtime/include/dart_api.h

Issue 10306002: Do not externalize Dart strings as C strings for "print()". (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: address review comments Created 8 years, 7 months 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 | « runtime/bin/builtin_natives.cc ('k') | runtime/vm/dart_api_impl.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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 * \param str A string. 1249 * \param str A string.
1250 * \param utf8 Returns the String represented as a utf8 encoded C 1250 * \param utf8 Returns the String represented as a utf8 encoded C
1251 * string. This C string is scope allocated and is only valid until 1251 * string. This C string is scope allocated and is only valid until
1252 * the next call to Dart_ExitScope. 1252 * the next call to Dart_ExitScope.
1253 * 1253 *
1254 * \return A valid handle if no error occurs during the operation. 1254 * \return A valid handle if no error occurs during the operation.
1255 */ 1255 */
1256 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str, 1256 DART_EXPORT Dart_Handle Dart_StringToCString(Dart_Handle str,
1257 const char** utf8); 1257 const char** utf8);
1258 1258
1259 /**
1260 * Gets a UTF-8 encoded representation of a String.
1261 *
1262 * \param str A string.
1263 * \param bytes Returns the String represented as an array of UTF-8
1264 * code units. This array is scope allocated and is only valid until
1265 * the next call to Dart_ExitScope.
1266 * \param length Returns the length of the code units array, in bytes.
1267 *
1268 * \return A valid handle if no error occurs during the operation.
1269 */
1270 DART_EXPORT Dart_Handle Dart_StringToBytes(Dart_Handle str,
1271 const uint8_t** bytes,
1272 intptr_t* length);
1273
1259 // --- Lists --- 1274 // --- Lists ---
1260 1275
1261 /** 1276 /**
1262 * Is this object a List? 1277 * Is this object a List?
1263 */ 1278 */
1264 DART_EXPORT bool Dart_IsList(Dart_Handle object); 1279 DART_EXPORT bool Dart_IsList(Dart_Handle object);
1265 1280
1266 /** 1281 /**
1267 * Returns a List of the desired length. 1282 * Returns a List of the desired length.
1268 * 1283 *
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 2007
1993 // --- Profiling support ---- 2008 // --- Profiling support ----
1994 2009
1995 // External pprof support for gathering and dumping symbolic 2010 // External pprof support for gathering and dumping symbolic
1996 // information that can be used for better profile reports for 2011 // information that can be used for better profile reports for
1997 // dynamically generated code. 2012 // dynamically generated code.
1998 DART_EXPORT void Dart_InitPprofSupport(); 2013 DART_EXPORT void Dart_InitPprofSupport();
1999 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 2014 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
2000 2015
2001 #endif // INCLUDE_DART_API_H_ 2016 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698