File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -621,20 +621,10 @@ ZEND_FUNCTION(zstd_compress_init)
621621
622622 PHP_ZSTD_CONTEXT_OBJ_INIT_OF_CLASS (php_zstd_compress_context_ce );
623623
624- ctx -> cctx = ZSTD_createCCtx ();
625- if (ctx -> cctx == NULL ) {
624+ if (php_zstd_context_create_compress (ctx , level , NULL ) != SUCCESS ) {
626625 zval_ptr_dtor (return_value );
627- ZSTD_WARNING ("failed to create compress context" );
628626 RETURN_FALSE ;
629627 }
630- ctx -> cdict = NULL ;
631-
632- ZSTD_CCtx_reset (ctx -> cctx , ZSTD_reset_session_only );
633- ZSTD_CCtx_setParameter (ctx -> cctx , ZSTD_c_compressionLevel , level );
634-
635- ctx -> output .size = ZSTD_CStreamOutSize ();
636- ctx -> output .dst = emalloc (ctx -> output .size );
637- ctx -> output .pos = 0 ;
638628}
639629
640630ZEND_FUNCTION (zstd_compress_add )
You can’t perform that action at this time.
0 commit comments