File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -630,8 +630,7 @@ ZEND_FUNCTION(zstd_compress_init)
630630ZEND_FUNCTION (zstd_compress_add )
631631{
632632 php_zstd_context * ctx ;
633- char * in_buf ;
634- size_t in_size ;
633+ zend_string * input ;
635634 zend_bool end = 0 ;
636635 smart_string out = {0 };
637636#if PHP_VERSION_ID >= 80000
@@ -646,7 +645,7 @@ ZEND_FUNCTION(zstd_compress_add)
646645#else
647646 Z_PARAM_OBJECT_OF_CLASS (obj , php_zstd_compress_context_ce )
648647#endif
649- Z_PARAM_STRING ( in_buf , in_size )
648+ Z_PARAM_STR ( input )
650649 Z_PARAM_OPTIONAL
651650 Z_PARAM_BOOL (end )
652651 ZEND_PARSE_PARAMETERS_END_EX (RETURN_FALSE );
@@ -661,7 +660,7 @@ ZEND_FUNCTION(zstd_compress_add)
661660 RETURN_FALSE ;
662661 }
663662
664- ZSTD_inBuffer in = { in_buf , in_size , 0 };
663+ ZSTD_inBuffer in = { ZSTR_VAL ( input ), ZSTR_LEN ( input ) , 0 };
665664 size_t res ;
666665
667666 do {
You can’t perform that action at this time.
0 commit comments