| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 * Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 * for details. All rights reserved. Use of this source code is governed by a | 3 * for details. All rights reserved. Use of this source code is governed by a |
| 4 * BSD-style license that can be found in the LICENSE file. | 4 * BSD-style license that can be found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 #ifndef INCLUDE_DART_API_H_ | 7 #ifndef INCLUDE_DART_API_H_ |
| 8 #define INCLUDE_DART_API_H_ | 8 #define INCLUDE_DART_API_H_ |
| 9 | 9 |
| 10 /** \mainpage Dart Embedding API Reference | 10 /** \mainpage Dart Embedding API Reference |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 * | 178 * |
| 179 * Local handles are allocated within the current scope (see | 179 * Local handles are allocated within the current scope (see |
| 180 * Dart_EnterScope) and go away when the current scope exits. Unless | 180 * Dart_EnterScope) and go away when the current scope exits. Unless |
| 181 * otherwise indicated, callers should assume that all functions in | 181 * otherwise indicated, callers should assume that all functions in |
| 182 * the Dart embedding api return local handles. | 182 * the Dart embedding api return local handles. |
| 183 * | 183 * |
| 184 * Persistent handles are allocated within the current isolate. They | 184 * Persistent handles are allocated within the current isolate. They |
| 185 * can be used to store objects across scopes. Persistent handles have | 185 * can be used to store objects across scopes. Persistent handles have |
| 186 * the lifetime of the current isolate unless they are explicitly | 186 * the lifetime of the current isolate unless they are explicitly |
| 187 * deallocated (see Dart_DeletePersistentHandle). | 187 * deallocated (see Dart_DeletePersistentHandle). |
| 188 * The type Dart_Handle represents a handle (both local and persistent). |
| 189 * The type Dart_PersistentHandle is a Dart_Handle and it is used to |
| 190 * document that a persistent handle is expected as a parameter to a call |
| 191 * or the return value from a call is a persistent handle. |
| 188 */ | 192 */ |
| 189 typedef struct _Dart_Handle* Dart_Handle; | 193 typedef struct _Dart_Handle* Dart_Handle; |
| 190 typedef struct _Dart_PersistentHandle* Dart_PersistentHandle; | 194 typedef Dart_Handle Dart_PersistentHandle; |
| 191 typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; | 195 typedef struct _Dart_WeakPersistentHandle* Dart_WeakPersistentHandle; |
| 192 | 196 |
| 193 typedef void (*Dart_WeakPersistentHandleFinalizer)( | 197 typedef void (*Dart_WeakPersistentHandleFinalizer)( |
| 194 Dart_WeakPersistentHandle handle, | 198 Dart_WeakPersistentHandle handle, |
| 195 void* peer); | 199 void* peer); |
| 196 typedef void (*Dart_PeerFinalizer)(void* peer); | 200 typedef void (*Dart_PeerFinalizer)(void* peer); |
| 197 | 201 |
| 198 /** | 202 /** |
| 199 * Is this an error handle? | 203 * Is this an error handle? |
| 200 * | 204 * |
| (...skipping 2071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2272 * | 2276 * |
| 2273 * \param object An object. | 2277 * \param object An object. |
| 2274 * \param peer A value to store in the peer field. | 2278 * \param peer A value to store in the peer field. |
| 2275 * | 2279 * |
| 2276 * \return Returns an error if 'object' is a subtype of Null, num, or | 2280 * \return Returns an error if 'object' is a subtype of Null, num, or |
| 2277 * bool. | 2281 * bool. |
| 2278 */ | 2282 */ |
| 2279 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); | 2283 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer); |
| 2280 | 2284 |
| 2281 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ | 2285 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */ |
| OLD | NEW |