From: Michael Wallner Date: Tue, 21 Dec 2021 07:33:23 +0000 (+0100) Subject: use ION_STRING_EQUALS API X-Git-Tag: v0.1.0~62 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a81110e746d52da11103a5c4c46c0bab809d8598;p=awesomized%2Fext-ion use ION_STRING_EQUALS API --- diff --git a/ion_private.h b/ion_private.h index 5264b0b..6dc21d4 100644 --- a/ion_private.h +++ b/ion_private.h @@ -2106,10 +2106,8 @@ static inline void php_ion_unserialize_annotations(php_ion_unserializer *ser) ION_CHECK(ion_reader_get_an_annotation(ser->reader, i, &ann_str)); if (ann_str.length != 1) { - if (ann_str.length == ION_SYS_STRLEN_SHARED_SYMBOL_TABLE) { - if (!memcmp(ann_str.value, ION_SYMBOL_SHARED_SYMBOL_TABLE_BYTES, ION_SYS_STRLEN_SHARED_SYMBOL_TABLE)) { - ser->annotations.shared_symtab = true; - } + if (ION_STRING_EQUALS(&ann_str, &ION_SYMBOL_SHARED_SYMBOL_TABLE_STRING)) { + ser->annotations.shared_symtab = true; } continue; }