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

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

Issue 8492015: Allow printf-style arguments for Dart_Error and Api::Error. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | runtime/vm/dart_api_impl.h » ('j') | runtime/vm/dart_api_impl.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 * invalid. An empty C string ("") if the handle is valid. This C 114 * invalid. An empty C string ("") if the handle is valid. This C
115 * String is scope allocated and is only valid until the next call 115 * String is scope allocated and is only valid until the next call
116 * to Dart_ExitScope. 116 * to Dart_ExitScope.
117 */ 117 */
118 DART_EXPORT const char* Dart_GetError(const Dart_Handle& handle); 118 DART_EXPORT const char* Dart_GetError(const Dart_Handle& handle);
119 119
120 /** 120 /**
121 * Produces an invalid handle with the provided error message. 121 * Produces an invalid handle with the provided error message.
122 * 122 *
123 * This function makes its own copy of the error message and does not 123 * This function makes its own copy of the error message and does not
124 * claim ownership of the 'error' parameter. 124 * claim ownership of the 'error' parameter.
siva 2011/11/07 23:20:50 The comment is out of date now as there is no expl
turnidge 2011/11/07 23:55:35 Got rid of the comment. Nobody expects printf to
125 * 125 *
126 * Requires there to be a current isolate. 126 * Requires there to be a current isolate.
127 * 127 *
128 * \param error A C string containing an error message. 128 * \param error A C string containing an error message.
129 */ 129 */
130 DART_EXPORT Dart_Handle Dart_Error(const char* error); 130 DART_EXPORT Dart_Handle Dart_Error(const char* format, ...);
131 // TODO(turnidge): Accept printf-style args here.
132 131
133 /** 132 /**
134 * Allocates a persistent handle for an object. 133 * Allocates a persistent handle for an object.
135 * 134 *
136 * This handle has the lifetime of the current isolate unless it is 135 * This handle has the lifetime of the current isolate unless it is
137 * explicitly deallocated by calling Dart_DeletePersistentHandle. 136 * explicitly deallocated by calling Dart_DeletePersistentHandle.
138 * 137 *
139 * Requires there to be a current isolate. 138 * Requires there to be a current isolate.
140 */ 139 */
141 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object); 140 DART_EXPORT Dart_Handle Dart_NewPersistentHandle(Dart_Handle object);
(...skipping 993 matching lines...) Expand 10 before | Expand all | Expand 10 after
1135 1134
1136 // --- Profiling support ---- 1135 // --- Profiling support ----
1137 1136
1138 // External pprof support for gathering and dumping symbolic 1137 // External pprof support for gathering and dumping symbolic
1139 // information that can be used for better profile reports for 1138 // information that can be used for better profile reports for
1140 // dynamically generated code. 1139 // dynamically generated code.
1141 DART_EXPORT void Dart_InitPprofSupport(); 1140 DART_EXPORT void Dart_InitPprofSupport();
1142 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 1141 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
1143 1142
1144 #endif // INCLUDE_DART_API_H_ 1143 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.h » ('j') | runtime/vm/dart_api_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698