aboutsummaryrefslogtreecommitdiff
path: root/php/ext/google/protobuf/protobuf.h
diff options
context:
space:
mode:
authorLeonard Hecker <leonard@hecker.io>2018-07-20 22:03:00 +0200
committerPaul Yang <TeBoring@users.noreply.github.com>2018-07-20 13:03:00 -0700
commite7746f487cb9cca685ffb1b3d7dccc5554b618a4 (patch)
tree851e32ef5032765a8ad61c30b212aefc5f12703a /php/ext/google/protobuf/protobuf.h
parent656f64ec0b5dff6816886d66a0124ab4f8d1fd4b (diff)
downloadprotobuf-e7746f487cb9cca685ffb1b3d7dccc5554b618a4.tar.gz
php: Added nanosecond support for Timestamp (#3972)
* php: Added nanosecond support for Timestamp * php: Fixed compatibility test
Diffstat (limited to 'php/ext/google/protobuf/protobuf.h')
-rw-r--r--php/ext/google/protobuf/protobuf.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h
index 20035ab7f..3ef4c84b3 100644
--- a/php/ext/google/protobuf/protobuf.h
+++ b/php/ext/google/protobuf/protobuf.h
@@ -42,6 +42,10 @@
#define MAX_LENGTH_OF_INT64 20
#define SIZEOF_INT64 8
+/* From Chromium. */
+#define ARRAY_SIZE(x) \
+ ((sizeof(x)/sizeof(0[x])) / ((size_t)(!(sizeof(x) % sizeof(0[x])))))
+
// -----------------------------------------------------------------------------
// PHP7 Wrappers
// ----------------------------------------------------------------------------