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

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

Issue 10834017: Fix the definition of kIllegalPort in dart_api.h. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Use a #define to avoid undefined symbols in Dart extension shared objects. Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate); 798 DART_EXPORT void Dart_InterruptIsolate(Dart_Isolate isolate);
799 799
800 // --- Messages and Ports --- 800 // --- Messages and Ports ---
801 801
802 /** 802 /**
803 * A port is used to send or receive inter-isolate messages 803 * A port is used to send or receive inter-isolate messages
804 */ 804 */
805 typedef int64_t Dart_Port; 805 typedef int64_t Dart_Port;
806 806
807 /** 807 /**
808 * kIllegalPort is a port number guaranteed never to be associated 808 * ILLEGAL_PORT is a port number guaranteed never to be associated with a valid
809 * with a valid port. 809 * port.
810 */ 810 */
811 const Dart_Port kIllegalPort = 0; 811 #define ILLEGAL_PORT ((Dart_Port) 0)
812 812
813 /** 813 /**
814 * A message notification callback. 814 * A message notification callback.
815 * 815 *
816 * This callback allows the embedder to provide an alternate wakeup 816 * This callback allows the embedder to provide an alternate wakeup
817 * mechanism for the delivery of inter-isolate messages. It is the 817 * mechanism for the delivery of inter-isolate messages. It is the
818 * responsibility of the embedder to call Dart_HandleMessage to 818 * responsibility of the embedder to call Dart_HandleMessage to
819 * process the message. 819 * process the message.
820 */ 820 */
821 typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate); 821 typedef void (*Dart_MessageNotifyCallback)(Dart_Isolate dest_isolate);
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 * Creates a new native port. When messages are received on this 971 * Creates a new native port. When messages are received on this
972 * native port, then they will be dispatched to the provided native 972 * native port, then they will be dispatched to the provided native
973 * message handler. 973 * message handler.
974 * 974 *
975 * \param name The name of this port in debugging messages. 975 * \param name The name of this port in debugging messages.
976 * \param handler The C handler to run when messages arrive on the port. 976 * \param handler The C handler to run when messages arrive on the port.
977 * \param handle_concurrently Is it okay to process requests on this 977 * \param handle_concurrently Is it okay to process requests on this
978 * native port concurrently? 978 * native port concurrently?
979 * 979 *
980 * \return If successful, returns the port id for the native port. In 980 * \return If successful, returns the port id for the native port. In
981 * case of error, returns kIllegalPort. 981 * case of error, returns ILLEGAL_PORT.
982 */ 982 */
983 DART_EXPORT Dart_Port Dart_NewNativePort(const char* name, 983 DART_EXPORT Dart_Port Dart_NewNativePort(const char* name,
984 Dart_NativeMessageHandler handler, 984 Dart_NativeMessageHandler handler,
985 bool handle_concurrently); 985 bool handle_concurrently);
986 // TODO(turnidge): Currently handle_concurrently is ignored. 986 // TODO(turnidge): Currently handle_concurrently is ignored.
987 987
988 /** 988 /**
989 * Closes the native port with the given id. 989 * Closes the native port with the given id.
990 * 990 *
991 * The port must have been allocated by a call to Dart_NewNativePort. 991 * The port must have been allocated by a call to Dart_NewNativePort.
(...skipping 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 // information that can be used for better profile reports for 2589 // information that can be used for better profile reports for
2590 // dynamically generated code. 2590 // dynamically generated code.
2591 DART_EXPORT void Dart_InitPprofSupport(); 2591 DART_EXPORT void Dart_InitPprofSupport();
2592 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size); 2592 DART_EXPORT void Dart_GetPprofSymbolInfo(void** buffer, int* buffer_size);
2593 2593
2594 // Support for generating flow graph compiler debugging output into a file. 2594 // Support for generating flow graph compiler debugging output into a file.
2595 typedef void (*FileWriterFunction)(const char* buffer, int64_t num_bytes); 2595 typedef void (*FileWriterFunction)(const char* buffer, int64_t num_bytes);
2596 DART_EXPORT void Dart_InitFlowGraphPrinting(FileWriterFunction function); 2596 DART_EXPORT void Dart_InitFlowGraphPrinting(FileWriterFunction function);
2597 2597
2598 #endif // INCLUDE_DART_API_H_ 2598 #endif // INCLUDE_DART_API_H_
OLDNEW
« no previous file with comments | « runtime/bin/socket.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698