@@ -444,7 +444,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_secp256k1_xonly_pubkey_tweak_add, I
444444#endif
445445 ZEND_ARG_TYPE_INFO (0 , context , IS_RESOURCE , 0 )
446446 ZEND_ARG_TYPE_INFO (1 , outputPubKey , IS_RESOURCE , 1 )
447- ZEND_ARG_TYPE_INFO (1 , isPositive , IS_LONG , 1 )
447+ ZEND_ARG_TYPE_INFO (1 , hasSquareY , IS_LONG , 1 )
448448 ZEND_ARG_TYPE_INFO (0 , internalPubKey , IS_RESOURCE , 0 )
449449 ZEND_ARG_TYPE_INFO (0 , tweak32 , IS_STRING , 0 )
450450ZEND_END_ARG_INFO ();
@@ -456,7 +456,7 @@ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO(arginfo_secp256k1_xonly_pubkey_tweak_verify
456456#endif
457457 ZEND_ARG_TYPE_INFO (0 , context , IS_RESOURCE , 0 )
458458 ZEND_ARG_TYPE_INFO (0 , outputPubKey , IS_RESOURCE , 0 )
459- ZEND_ARG_TYPE_INFO (0 , isPositive , IS_LONG , 0 )
459+ ZEND_ARG_TYPE_INFO (0 , hasSquareY , IS_LONG , 0 )
460460 ZEND_ARG_TYPE_INFO (0 , internalPubKey , IS_RESOURCE , 0 )
461461 ZEND_ARG_TYPE_INFO (0 , tweak32 , IS_STRING , 0 )
462462ZEND_END_ARG_INFO ();
@@ -1978,18 +1978,18 @@ PHP_FUNCTION(secp256k1_xonly_privkey_tweak_add)
19781978}
19791979/* }}} */
19801980
1981- /* {{{ proto int secp256k1_xonly_pubkey_tweak_add(resource context, resource &output_pubkey, resource internal_pubkey, string tweak32)
1981+ /* {{{ proto int secp256k1_xonly_pubkey_tweak_add(resource context, resource &output_pubkey, int &has_square_y, resource internal_pubkey, string tweak32)
19821982 * Tweak a public key by adding tweak times the generator to it. */
19831983PHP_FUNCTION (secp256k1_xonly_pubkey_tweak_add )
19841984{
1985- zval * zCtx , * zOutputPubKey , * zIsPositive , * zInternalPubKey ;
1985+ zval * zCtx , * zOutputPubKey , * zHasSquareY , * zInternalPubKey ;
19861986 secp256k1_context * ctx ;
19871987 secp256k1_xonly_pubkey * output_pubkey , * internal_pubkey ;
19881988 zend_string * zTweak ;
1989- int is_positive ;
1989+ int has_square_y ;
19901990 int result ;
19911991
1992- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rz/z/rS" , & zCtx , & zOutputPubKey , & zIsPositive , & zInternalPubKey , & zTweak ) == FAILURE ) {
1992+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rz/z/rS" , & zCtx , & zOutputPubKey , & zHasSquareY , & zInternalPubKey , & zTweak ) == FAILURE ) {
19931993 RETURN_LONG (0 );
19941994 }
19951995
@@ -2005,12 +2005,12 @@ PHP_FUNCTION(secp256k1_xonly_pubkey_tweak_add)
20052005 }
20062006
20072007 output_pubkey = emalloc (sizeof (secp256k1_xonly_pubkey ));
2008- result = secp256k1_xonly_pubkey_tweak_add (ctx , output_pubkey , & is_positive , internal_pubkey , (unsigned char * )zTweak -> val );
2008+ result = secp256k1_xonly_pubkey_tweak_add (ctx , output_pubkey , & has_square_y , internal_pubkey , (unsigned char * )zTweak -> val );
20092009 if (result ) {
20102010 zval_dtor (zOutputPubKey );
20112011 ZVAL_RES (zOutputPubKey , zend_register_resource (output_pubkey , le_secp256k1_xonly_pubkey ));
2012- zval_dtor (zIsPositive );
2013- ZVAL_LONG (zIsPositive , is_positive );
2012+ zval_dtor (zHasSquareY );
2013+ ZVAL_LONG (zHasSquareY , has_square_y );
20142014 } else {
20152015 efree (output_pubkey );
20162016 }
@@ -2026,11 +2026,11 @@ PHP_FUNCTION(secp256k1_xonly_pubkey_tweak_verify)
20262026 zval * zCtx , * zOutputPubKey , * zInternalPubKey ;
20272027 secp256k1_context * ctx ;
20282028 secp256k1_xonly_pubkey * output_pubkey , * internal_pubkey ;
2029- zend_long is_positive ;
2029+ zend_long has_square_y ;
20302030 zend_string * zTweak32 ;
20312031 int result ;
20322032
2033- if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rrlrS" , & zCtx , & zOutputPubKey , & is_positive , & zInternalPubKey , & zTweak32 ) == FAILURE ) {
2033+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "rrlrS" , & zCtx , & zOutputPubKey , & has_square_y , & zInternalPubKey , & zTweak32 ) == FAILURE ) {
20342034 RETURN_LONG (0 );
20352035 }
20362036
@@ -2047,7 +2047,7 @@ PHP_FUNCTION(secp256k1_xonly_pubkey_tweak_verify)
20472047 return ;
20482048 }
20492049
2050- result = secp256k1_xonly_pubkey_tweak_verify (ctx , output_pubkey , (int )is_positive , internal_pubkey , (unsigned char * )zTweak32 -> val );
2050+ result = secp256k1_xonly_pubkey_tweak_verify (ctx , output_pubkey , (int )has_square_y , internal_pubkey , (unsigned char * )zTweak32 -> val );
20512051
20522052 RETURN_LONG (result );
20532053}
0 commit comments