File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2583,13 +2583,6 @@ PHP_MINIT_FUNCTION(decimal)
25832583
25842584 ZEND_INIT_MODULE_GLOBALS (decimal , php_decimal_init_globals , NULL );
25852585
2586- /* Initialize the shared context */
2587- mpd_init (php_decimal_context (), PHP_DECIMAL_DEFAULT_PRECISION );
2588-
2589- /* Set default rounding */
2590- mpd_qsettraps (php_decimal_context (), PHP_DECIMAL_TRAPS );
2591- mpd_qsetround (php_decimal_context (), PHP_DECIMAL_DEFAULT_ROUNDING );
2592-
25932586 /* Set custom memory allocation functions */
25942587 mpd_callocfunc = php_decimal_mpd_calloc ;
25952588 mpd_mallocfunc = php_decimal_mpd_malloc ;
@@ -2615,6 +2608,13 @@ PHP_MSHUTDOWN_FUNCTION(decimal)
26152608 */
26162609PHP_RINIT_FUNCTION (decimal )
26172610{
2611+ /* Initialize the shared context */
2612+ mpd_init (php_decimal_context (), PHP_DECIMAL_DEFAULT_PRECISION );
2613+
2614+ /* Set default rounding */
2615+ mpd_qsettraps (php_decimal_context (), PHP_DECIMAL_TRAPS );
2616+ mpd_qsetround (php_decimal_context (), PHP_DECIMAL_DEFAULT_ROUNDING );
2617+
26182618#if defined(COMPILE_DL_DECIMAL ) && defined(ZTS )
26192619 ZEND_TSRMLS_CACHE_UPDATE ();
26202620#endif
You can’t perform that action at this time.
0 commit comments