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

Unified Diff: ppapi/c/dev/pp_file_info_dev.h

Issue 5674004: Add compile assertions to enforce the sizes of all structs and enums in the C... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years 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
Index: ppapi/c/dev/pp_file_info_dev.h
===================================================================
--- ppapi/c/dev/pp_file_info_dev.h (revision 68603)
+++ ppapi/c/dev/pp_file_info_dev.h (working copy)
@@ -5,6 +5,7 @@
#ifndef PPAPI_C_DEV_PP_FILE_INFO_DEV_H_
#define PPAPI_C_DEV_PP_FILE_INFO_DEV_H_
+#include "ppapi/c/pp_macros.h"
#include "ppapi/c/pp_stdint.h"
#include "ppapi/c/pp_time.h"
@@ -13,12 +14,14 @@
PP_FILETYPE_DIRECTORY,
PP_FILETYPE_OTHER // A catch-all for unidentified types.
} PP_FileType_Dev;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileType_Dev, 4);
typedef enum {
PP_FILESYSTEMTYPE_EXTERNAL,
PP_FILESYSTEMTYPE_LOCALPERSISTENT,
PP_FILESYSTEMTYPE_LOCALTEMPORARY
} PP_FileSystemType_Dev;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_FileSystemType_Dev, 4);
struct PP_FileInfo_Dev {
int64_t size; // Measured in bytes
@@ -28,5 +31,6 @@
PP_Time last_access_time;
PP_Time last_modified_time;
};
+PP_COMPILE_ASSERT_STRUCT_SIZE_IN_BYTES(PP_FileInfo_Dev, 40);
#endif // PPAPI_C_DEV_PP_FILE_INFO_DEV_H_

Powered by Google App Engine
This is Rietveld 408576698