@@ -30,9 +30,12 @@ PHP_FUNCTION(dns_get_mx) /* {{{ */
3030 DNS_STATUS status ; /* Return value of DnsQuery_A() function */
3131 PDNS_RECORD pResult , pRec ; /* Pointer to DNS_RECORD structure */
3232
33- if (zend_parse_parameters (ZEND_NUM_ARGS (), "pz|z" , & hostname , & hostname_len , & mx_list , & weight_list ) == FAILURE ) {
34- RETURN_THROWS ();
35- }
33+ ZEND_PARSE_PARAMETERS_START (2 , 3 )
34+ Z_PARAM_PATH (hostname , hostname_len )
35+ Z_PARAM_ZVAL (mx_list )
36+ Z_PARAM_OPTIONAL
37+ Z_PARAM_ZVAL (weight_list )
38+ ZEND_PARSE_PARAMETERS_END ();
3639
3740 status = DnsQuery_A (hostname , DNS_TYPE_MX , DNS_QUERY_STANDARD , NULL , & pResult , NULL );
3841
@@ -84,9 +87,11 @@ PHP_FUNCTION(dns_check_record)
8487 DNS_STATUS status ; /* Return value of DnsQuery_A() function */
8588 PDNS_RECORD pResult ; /* Pointer to DNS_RECORD structure */
8689
87- if (zend_parse_parameters (ZEND_NUM_ARGS (), "p|S" , & hostname , & hostname_len , & rectype ) == FAILURE ) {
88- RETURN_THROWS ();
89- }
90+ ZEND_PARSE_PARAMETERS_START (1 , 2 )
91+ Z_PARAM_PATH (hostname , hostname_len )
92+ Z_PARAM_OPTIONAL
93+ Z_PARAM_STR (rectype )
94+ ZEND_PARSE_PARAMETERS_END ();
9095
9196 if (hostname_len == 0 ) {
9297 zend_argument_must_not_be_empty_error (1 );
@@ -337,10 +342,14 @@ PHP_FUNCTION(dns_get_record)
337342 int type , type_to_fetch , first_query = 1 , store_results = 1 ;
338343 bool raw = false;
339344
340- if (zend_parse_parameters (ZEND_NUM_ARGS (), "p|lz!z!b" ,
341- & hostname , & hostname_len , & type_param , & authns , & addtl , & raw ) == FAILURE ) {
342- RETURN_THROWS ();
343- }
345+ ZEND_PARSE_PARAMETERS_START (1 , 5 )
346+ Z_PARAM_PATH (hostname , hostname_len )
347+ Z_PARAM_OPTIONAL
348+ Z_PARAM_LONG (type_param )
349+ Z_PARAM_ZVAL_OR_NULL (authns )
350+ Z_PARAM_ZVAL_OR_NULL (addtl )
351+ Z_PARAM_BOOL (raw )
352+ ZEND_PARSE_PARAMETERS_END ();
344353
345354 if (authns ) {
346355 authns = zend_try_array_init (authns );
0 commit comments