Lines Matching refs:gmpnumber
47 ZEND_ARG_INFO(0, gmpnumber)
51 ZEND_ARG_INFO(0, gmpnumber)
408 #define FETCH_GMP_ZVAL(gmpnumber, zval, tmp_resource) \ argument
410 ZEND_FETCH_RESOURCE(gmpnumber, mpz_t *, zval, -1, GMP_RESOURCE_NAME, le_gmp); \
413 if (convert_to_gmp(&gmpnumber, zval, 0 TSRMLS_CC) == FAILURE) { \
416 tmp_resource = ZEND_REGISTER_RESOURCE(NULL, gmpnumber, le_gmp); \
426 #define INIT_GMP_NUM(gmpnumber) { gmpnumber=emalloc(sizeof(mpz_t)); mpz_init(*gmpnumber); } argument
427 #define FREE_GMP_NUM(gmpnumber) { mpz_clear(*gmpnumber); efree(gmpnumber); } argument
431 static int convert_to_gmp(mpz_t * *gmpnumber, zval **val, int base TSRMLS_DC) in convert_to_gmp() argument
436 *gmpnumber = emalloc(sizeof(mpz_t)); in convert_to_gmp()
444 mpz_init_set_si(**gmpnumber, Z_LVAL_PP(val)); in convert_to_gmp()
462 ret = mpz_init_set_str(**gmpnumber, (skip_lead ? &numstr[2] : numstr), base); in convert_to_gmp()
467 efree(*gmpnumber); in convert_to_gmp()
472 FREE_GMP_NUM(*gmpnumber); in convert_to_gmp()
757 mpz_t * gmpnumber; in ZEND_FUNCTION() local
769 if (convert_to_gmp(&gmpnumber, number_arg, base TSRMLS_CC) == FAILURE) { in ZEND_FUNCTION()
774 ZEND_REGISTER_RESOURCE(return_value, gmpnumber, le_gmp); in ZEND_FUNCTION()