diff options
author | Paul Yang <TeBoring@users.noreply.github.com> | 2017-01-27 13:17:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-27 13:17:54 -0800 |
commit | a323f1e65da2c512f971a2edf1918a0cca340015 (patch) | |
tree | 22ae538979fd53567f144a112b069ae2706a03e0 /php/ext/google/protobuf/protobuf.h | |
parent | 5af0b547de7aba6d6206943546262cb21fedc721 (diff) | |
download | protobuf-a323f1e65da2c512f971a2edf1918a0cca340015.tar.gz protobuf-a323f1e65da2c512f971a2edf1918a0cca340015.tar.bz2 protobuf-a323f1e65da2c512f971a2edf1918a0cca340015.zip |
Oneof accessor should return the field name that is actually set. (#2631)
Diffstat (limited to 'php/ext/google/protobuf/protobuf.h')
-rw-r--r-- | php/ext/google/protobuf/protobuf.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/protobuf.h b/php/ext/google/protobuf/protobuf.h index 8022a9aa..bd01005b 100644 --- a/php/ext/google/protobuf/protobuf.h +++ b/php/ext/google/protobuf/protobuf.h @@ -237,10 +237,13 @@ zval* layout_get(MessageLayout* layout, const void* storage, const upb_fielddef* field, zval** cache TSRMLS_DC); void layout_set(MessageLayout* layout, MessageHeader* header, const upb_fielddef* field, zval* val TSRMLS_DC); +const char* layout_get_oneof_case(MessageLayout* layout, const void* storage, + const upb_oneofdef* oneof TSRMLS_DC); void free_layout(MessageLayout* layout); PHP_METHOD(Message, readOneof); PHP_METHOD(Message, writeOneof); +PHP_METHOD(Message, whichOneof); PHP_METHOD(Message, __construct); // ----------------------------------------------------------------------------- |