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

Unified Diff: runtime/bin/file.cc

Issue 15689013: - Modify dart_api.h to be a proper C API. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file.cc
===================================================================
--- runtime/bin/file.cc (revision 23447)
+++ runtime/bin/file.cc (working copy)
@@ -571,7 +571,8 @@
int64_t stat_data[File::kStatSize];
File::Stat(path, stat_data);
- Dart_Handle returned_data = Dart_NewTypedData(kInt64, File::kStatSize);
+ Dart_Handle returned_data = Dart_NewTypedData(Dart_TypedData_kInt64,
+ File::kStatSize);
if (Dart_IsError(returned_data)) Dart_PropagateError(returned_data);
Dart_TypedData_Type data_type_unused;
void* data_location;
@@ -962,22 +963,22 @@
}
-static int SizeInBytes(Dart_CObject::TypedDataType type) {
+static int SizeInBytes(Dart_TypedData_Type type) {
switch (type) {
- case Dart_CObject::kInt8Array:
- case Dart_CObject::kUint8Array:
- case Dart_CObject::kUint8ClampedArray:
+ case Dart_TypedData_kInt8:
+ case Dart_TypedData_kUint8:
+ case Dart_TypedData_kUint8Clamped:
return 1;
- case Dart_CObject::kInt16Array:
- case Dart_CObject::kUint16Array:
+ case Dart_TypedData_kInt16:
+ case Dart_TypedData_kUint16:
return 2;
- case Dart_CObject::kInt32Array:
- case Dart_CObject::kUint32Array:
- case Dart_CObject::kFloat32Array:
+ case Dart_TypedData_kInt32:
+ case Dart_TypedData_kUint32:
+ case Dart_TypedData_kFloat32:
return 4;
- case Dart_CObject::kInt64Array:
- case Dart_CObject::kUint64Array:
- case Dart_CObject::kFloat64Array:
+ case Dart_TypedData_kInt64:
+ case Dart_TypedData_kUint64:
+ case Dart_TypedData_kFloat64:
return 8;
default:
break;
@@ -1142,7 +1143,7 @@
Dart_CObject* message) {
CObject* response = CObject::IllegalArgumentError();
CObjectArray request(message);
- if (message->type == Dart_CObject::kArray) {
+ if (message->type == Dart_CObject_kArray) {
if (request.Length() > 1 && request[0]->IsInt32()) {
CObjectInt32 requestType(request[0]);
switch (requestType.Value()) {
« no previous file with comments | « runtime/bin/directory.cc ('k') | runtime/bin/gen_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698