From: Michael Wallner Date: Mon, 20 Dec 2021 15:30:52 +0000 (+0100) Subject: remo0ve semi-global PHP anntotation interfering with system values X-Git-Tag: v0.1.0~64 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=fad51da09c6ee7bf82a319b8c1e4fc21cdde42af;p=awesomized%2Fext-ion remo0ve semi-global PHP anntotation interfering with system values --- diff --git a/ion_private.h b/ion_private.h index 72a39b1..342b164 100644 --- a/ion_private.h +++ b/ion_private.h @@ -1567,11 +1567,7 @@ static inline void php_ion_serialize_ex(php_ion_serializer *ser, zval *zv) } while (zv) { - /* start off with a global PHP annotation instead of repeating it all over the place */ - if (0 == php_ion_globals_serializer_step()) { - ION_STRING is; - ION_CHECK(ion_writer_add_annotation(ser->writer, ion_string_assign_cstr(&is, ZEND_STRL("PHP")))); - } + php_ion_globals_serializer_step(); php_ion_serialize_zval(ser, zv); php_ion_globals_serializer_exit(); diff --git a/tests/serialize/backref.phpt b/tests/serialize/backref.phpt index 97d1498..4538ab5 100644 --- a/tests/serialize/backref.phpt +++ b/tests/serialize/backref.phpt @@ -24,12 +24,12 @@ debug_zval_dump($x); DONE --EXPECTF-- TEST -PHP::[R::r::0] +[R::r::0] array(1) { [0]=> *RECURSION* } -PHP::[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6] +[[R::r::1],["a",r::4,o::{},r::5,[1,2,3],r::6],r::3,r::4,r::5,r::6] array(6) refcount(2){ [0]=> array(1) refcount(2){ diff --git a/tests/serialize/basic.phpt b/tests/serialize/basic.phpt index 19bb0b2..24274cf 100644 --- a/tests/serialize/basic.phpt +++ b/tests/serialize/basic.phpt @@ -19,6 +19,6 @@ var_dump($data == ion\unserialize($s)); DONE --EXPECTF-- TEST -PHP::{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}} +{'null':null,bool:true,int:123,double:12%f,string:"foobar",object:o::{prop:"data"}} bool(true) DONE diff --git a/tests/serialize/enum.phpt b/tests/serialize/enum.phpt index 12a7411..9920fb9 100644 --- a/tests/serialize/enum.phpt +++ b/tests/serialize/enum.phpt @@ -32,10 +32,10 @@ var_dump(ion\unserialize($s)); DONE --EXPECTF-- TEST -PHP::E::e::a +E::e::a enum(e::a) -PHP::E::i::b +E::i::b enum(i::b) -PHP::E::s::a +E::s::a enum(s::a) DONE diff --git a/tests/serialize/magic.phpt b/tests/serialize/magic.phpt index f7d1f93..443064b 100644 --- a/tests/serialize/magic.phpt +++ b/tests/serialize/magic.phpt @@ -31,7 +31,7 @@ var_dump(ion\unserialize($s)); DONE --EXPECTF-- TEST -PHP::O::magic::{priv:1,prot:2,pub:3} +O::magic::{priv:1,prot:2,pub:3} object(magic)#%d (3) { ["priv":"magic":private]=> int(1) diff --git a/tests/serialize/popo.phpt b/tests/serialize/popo.phpt index 1e09d2c..7d0da8b 100644 --- a/tests/serialize/popo.phpt +++ b/tests/serialize/popo.phpt @@ -24,7 +24,7 @@ var_dump(ion\unserialize($s)); DONE --EXPECTF-- TEST -PHP::c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3} +c::popo::{priv:p::popo::1,prot:p::'*'::2,pub:3} object(popo)#%d (3) { ["priv":"popo":private]=> int(1) diff --git a/tests/serialize/serializable.phpt b/tests/serialize/serializable.phpt index 0dc2cc7..efb9f27 100644 --- a/tests/serialize/serializable.phpt +++ b/tests/serialize/serializable.phpt @@ -59,7 +59,7 @@ Deprecated: test implements the Serializable interface, which is deprecated. Imp Deprecated: recursive implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %sserialize/serializable.php on line %d -PHP::[S::test::"foobar",r::1] +[S::test::"foobar",r::1] array(2) refcount(2){ [0]=> object(test)#%d (1) refcount(2){ @@ -83,7 +83,7 @@ object(recursive)#%d (2) { NULL } } -PHP::S::recursive::"node:S::recursive::\"leaf\"" +S::recursive::"node:S::recursive::\"leaf\"" object(recursive)#%d (2) refcount(1){ ["id":"recursive":private]=> string(4) "node" refcount(1)