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

Unified Diff: tools/dom/scripts/systemnative.py

Issue 22859038: Use new Dart API functions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/scripts/systemnative.py
===================================================================
--- tools/dom/scripts/systemnative.py (revision 26490)
+++ tools/dom/scripts/systemnative.py (working copy)
@@ -976,8 +976,14 @@
# Generate to Dart conversion of C++ value.
if return_type_info.dart_type() == 'bool':
set_return_value = 'Dart_SetBooleanReturnValue(args, %s)' % (value_expression)
- elif return_type_info.dart_type() == 'int' and return_type_info.native_type() == 'int':
- set_return_value = 'Dart_SetIntegerReturnValue(args, %s)' % (value_expression)
+ elif return_type_info.dart_type() == 'int':
+ if return_type_info.native_type() == 'unsigned':
+ set_return_value = 'DartUtilities::setDartUnsignedReturnValue(args, %s)' % (value_expression)
+ elif return_type_info.native_type() == 'unsigned long long':
+ set_return_value = 'DartUtilities::setDartUnsignedLongLongReturnValue(args, %s)' % (value_expression)
+ else:
+ assert (return_type_info.native_type() == 'int' or return_type_info.native_type() == 'long long')
+ set_return_value = 'DartUtilities::setDartIntegerReturnValue(args, %s)' % (value_expression)
elif return_type_info.dart_type() == 'double':
set_return_value = 'Dart_SetDoubleReturnValue(args, %s)' % (value_expression)
elif return_type_info.dart_type() == 'String':
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698