Chromium Code Reviews| Index: runtime/include/dart_api.h |
| diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h |
| index 1fc3f4e26902ed9ac4c475f8e3b0515973b04509..6e9be59cc82224bb5f0d85fce1856076d8921c63 100755 |
| --- a/runtime/include/dart_api.h |
| +++ b/runtime/include/dart_api.h |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| +// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| @@ -1360,4 +1360,28 @@ DART_EXPORT Dart_Handle Dart_SetNativeResolver( |
| DART_EXPORT void Dart_InitPprofSupport(); |
| DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); |
| +// --- Message encoding/decoding ---- |
| + |
| +struct Dart_Value { |
|
turnidge
2012/01/26 19:48:30
I'm wondering about what to name this struct. Dar
Søren Gjesse
2012/01/27 14:40:03
The reason for the name Dart_Value is that it is j
|
| + enum Type { |
| + kNull, |
| + kBool, |
| + kInt32, |
|
siva
2012/01/27 01:56:52
We would need a kInt64 type too?
Søren Gjesse
2012/01/27 14:40:03
I think we do. I have only added the types needed
|
| + kDouble, |
| + kString, |
| + kArray |
| + }; |
| + Type type; |
| + union { |
| + bool bl; |
| + int32_t int32; |
| + double dbl; |
| + char* str; |
|
turnidge
2012/01/26 19:48:30
I might prefer names like "bool_value", "int32_val
siva
2012/01/27 01:56:52
The code is going to look as follows:
Data_Value m
Søren Gjesse
2012/01/27 14:40:03
Changed to value.asXXX as suggested by Siva.
Søren Gjesse
2012/01/27 14:40:03
I like the value.asXXX - used value.as_xxx to stic
|
| + struct { |
| + int len; |
| + Dart_Value** values; |
| + } array; |
| + } data; |
| +}; |
| + |
| #endif // INCLUDE_DART_API_H_ |