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

Unified Diff: ppapi/c/pp_var.h

Issue 4310002: Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on W... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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 | « ppapi/c/pp_size.h ('k') | ppapi/c/ppb_class.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/pp_var.h
===================================================================
--- ppapi/c/pp_var.h (revision 65116)
+++ ppapi/c/pp_var.h (working copy)
@@ -13,6 +13,8 @@
* @{
*/
+#include "ppapi/c/pp_bool.h"
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_stdint.h"
typedef enum {
@@ -40,7 +42,7 @@
struct PP_Var {
PP_VarType type;
union {
- bool as_bool;
+ PP_Bool as_bool;
int32_t as_int;
double as_double;
@@ -53,30 +55,30 @@
} value;
};
-inline struct PP_Var PP_MakeUndefined() {
- struct PP_Var result = { PP_VARTYPE_UNDEFINED, {0} };
+PP_INLINE struct PP_Var PP_MakeUndefined() {
+ struct PP_Var result = { PP_VARTYPE_UNDEFINED, {PP_FALSE} };
return result;
}
-inline struct PP_Var PP_MakeNull() {
- struct PP_Var result = { PP_VARTYPE_NULL, {0} };
+PP_INLINE struct PP_Var PP_MakeNull() {
+ struct PP_Var result = { PP_VARTYPE_NULL, {PP_FALSE} };
return result;
}
-inline struct PP_Var PP_MakeBool(bool value) {
- struct PP_Var result = { PP_VARTYPE_BOOL, {0} };
+PP_INLINE struct PP_Var PP_MakeBool(PP_Bool value) {
+ struct PP_Var result = { PP_VARTYPE_BOOL, {PP_FALSE} };
result.value.as_bool = value;
return result;
}
-inline struct PP_Var PP_MakeInt32(int32_t value) {
- PP_Var result = { PP_VARTYPE_INT32, {0} };
+PP_INLINE struct PP_Var PP_MakeInt32(int32_t value) {
+ struct PP_Var result = { PP_VARTYPE_INT32, {PP_FALSE} };
result.value.as_int = value;
return result;
}
-inline struct PP_Var PP_MakeDouble(double value) {
- PP_Var result = { PP_VARTYPE_DOUBLE, {0} };
+PP_INLINE struct PP_Var PP_MakeDouble(double value) {
+ struct PP_Var result = { PP_VARTYPE_DOUBLE, {PP_FALSE} };
result.value.as_double = value;
return result;
}
« no previous file with comments | « ppapi/c/pp_size.h ('k') | ppapi/c/ppb_class.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698