From: Michael Wallner Date: Tue, 5 Apr 2022 08:14:56 +0000 (+0200) Subject: rm unused code X-Git-Tag: v0.2.0~11 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=c41f06c364e487762e056c181fbea4d71d162118;p=awesomized%2Fext-ion rm unused code --- diff --git a/ion.c b/ion.c index e1d77b9..749527c 100644 --- a/ion.c +++ b/ion.c @@ -1686,99 +1686,6 @@ static ZEND_METHOD(ion_Writer_Stream_Writer, getStream) RETURN_RES(obj->stream.ptr->res); } -static ZEND_METHOD(ion_Serializer_Serializer, serializeNull) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - ZEND_PARSE_PARAMETERS_NONE(); - - ION_CHECK(ion_writer_write_null(php_ion_obj(writer, obj->wri)->writer)); -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeBool) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - zend_bool b; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_BOOL(b) - ZEND_PARSE_PARAMETERS_END(); - - ION_CHECK(ion_writer_write_bool(php_ion_obj(writer, obj->wri)->writer, b)); -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeInt) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - zend_long l; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_LONG(l); - ZEND_PARSE_PARAMETERS_END(); - - ION_CHECK(ion_writer_write_int64(php_ion_obj(writer, obj->wri)->writer, l)); -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeFloat) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - double d; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_DOUBLE(d); - ZEND_PARSE_PARAMETERS_END(); - - ION_CHECK(ion_writer_write_double(php_ion_obj(writer, obj->wri)->writer, d)); -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeString) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - zend_string *zs; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_STR(zs); - ZEND_PARSE_PARAMETERS_END(); - - ION_STRING is; - ION_CHECK(ion_writer_write_string(php_ion_obj(writer, obj->wri)->writer, ion_string_from_zend(&is, zs))); -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeArray) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - zend_array *arr; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_ARRAY_HT(arr) - ZEND_PARSE_PARAMETERS_END(); - - if (zend_array_is_list(arr)) { - php_ion_serialize_list(obj, arr); - } else { - php_ion_serialize_struct(obj, arr, false, false); - } -} - -static ZEND_METHOD(ion_Serializer_Serializer, serializeObject) -{ - php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS)); - OBJ_CHECK(obj); - - zend_object *o; - ZEND_PARSE_PARAMETERS_START(1, 1) - Z_PARAM_OBJ(o) - ZEND_PARSE_PARAMETERS_END(); - - php_ion_serialize_object(obj, o); -} - static ZEND_METHOD(ion_Serializer_Serializer, __construct) { php_ion_serializer *obj = php_ion_obj(serializer, Z_OBJ_P(ZEND_THIS));