@@ -68,32 +68,28 @@ ZEND_DECLARE_MODULE_GLOBALS(krisp)
68
68
/* True global resources - no need for thread safety here */
69
69
static int le_krisp ;
70
70
71
- ZEND_BEGIN_ARG_INFO_EX (arginfo_krisp_open , 0 , 0 , 0 )
72
- ZEND_ARG_INFO (0 , database )
73
- ZEND_ARG_INFO (1 , error )
74
- ZEND_END_ARG_INFO ()
75
-
71
+ #include "php_krisp_arginfo.h"
76
72
#include "php_krisp_class.h"
77
73
78
74
/* {{{ krisp_functions[]
79
75
*
80
76
* Every user visible function must have an entry in krisp_functions[].
81
77
*/
82
78
const zend_function_entry krisp_functions [] = {
83
- PHP_FE (krisp_buildver , NULL )
84
- PHP_FE (krisp_version , NULL )
85
- PHP_FE (krisp_uversion , NULL )
79
+ PHP_FE (krisp_buildver , arginfo_krisp_buildver )
80
+ PHP_FE (krisp_version , arginfo_krisp_version )
81
+ PHP_FE (krisp_uversion , arginfo_krisp_uversion )
86
82
PHP_FE (krisp_open , arginfo_krisp_open )
87
- PHP_FE (krisp_search , NULL )
88
- PHP_FE (krisp_search_ex , NULL )
89
- PHP_FE (krisp_close , NULL )
90
- PHP_FE (krisp_netmask , NULL )
91
- PHP_FE (krisp_network , NULL )
92
- PHP_FE (krisp_broadcast , NULL )
93
- PHP_FE (krisp_prefix2mask , NULL )
94
- PHP_FE (krisp_mask2prefix , NULL )
95
- PHP_FE (krisp_set_mtime_interval , NULL )
96
- PHP_FE (krisp_set_debug , NULL )
83
+ PHP_FE (krisp_search , arginfo_krisp_search )
84
+ PHP_FE (krisp_search_ex , arginfo_krisp_search_ex )
85
+ PHP_FE (krisp_close , arginfo_krisp_close )
86
+ PHP_FE (krisp_netmask , arginfo_krisp_netmask )
87
+ PHP_FE (krisp_network , arginfo_krisp_netmask )
88
+ PHP_FE (krisp_broadcast , arginfo_krisp_broadcast )
89
+ PHP_FE (krisp_prefix2mask , arginfo_krisp_prefix2mask )
90
+ PHP_FE (krisp_mask2prefix , arginfo_krisp_mask2prefix )
91
+ PHP_FE (krisp_set_mtime_interval , arginfo_krisp_set_mtime_interval )
92
+ PHP_FE (krisp_set_debug , arginfo_krisp_set_debug )
97
93
PHP_FE_END
98
94
};
99
95
/* }}} */
@@ -202,31 +198,31 @@ PHP_MINFO_FUNCTION(krisp)
202
198
}
203
199
/* }}} */
204
200
205
- /* {{{ proto (string) krisp_buildver (void)
201
+ /* {{{ proto krisp_buildver (void): string
206
202
* print krisp extension build number */
207
203
PHP_FUNCTION (krisp_buildver )
208
204
{
209
205
RETURN_STRING (BUILDNO );
210
206
}
211
207
/* }}} */
212
208
213
- /* {{{ proto (string) krisp_version (void)
209
+ /* {{{ proto krisp_version (void): string
214
210
* print krisp library version */
215
211
PHP_FUNCTION (krisp_version )
216
212
{
217
213
RETURN_STRING (KRISP_VERSION );
218
214
}
219
215
/* }}} */
220
216
221
- /* {{{ proto (string) krisp_uversion (void)
217
+ /* {{{ proto krisp_uversion (void): string
222
218
* print krisp library uversion */
223
219
PHP_FUNCTION (krisp_uversion )
224
220
{
225
221
RETURN_STRING (KRISP_UVERSION );
226
222
}
227
223
/* }}} */
228
224
229
- /* {{{ proto (resource) krisp_open (string datafile)
225
+ /* {{{ proto krisp_open (string datafile): resource
230
226
* return krisp database open resource */
231
227
PHP_FUNCTION (krisp_open )
232
228
{
@@ -289,7 +285,7 @@ PHP_FUNCTION(krisp_open)
289
285
}
290
286
/* }}} */
291
287
292
- /* {{{ proto (object|false) krisp_search (resource link, string host)
288
+ /* {{{ proto krisp_search (resource link, string host): object|false
293
289
* return isp information array */
294
290
PHP_FUNCTION (krisp_search )
295
291
{
@@ -367,7 +363,7 @@ PHP_FUNCTION(krisp_search)
367
363
}
368
364
/* }}} */
369
365
370
- /* {{{ proto (object|false) krisp_search_ex (resource link, string host)
366
+ /* {{{ proto krisp_search_ex (resource link, string host): object|false
371
367
* return isp information array */
372
368
PHP_FUNCTION (krisp_search_ex )
373
369
{
@@ -470,7 +466,7 @@ PHP_FUNCTION(krisp_search_ex)
470
466
}
471
467
/* }}} */
472
468
473
- /* {{{ proto (bool) krisp_close (resource link)
469
+ /* {{{ proto krisp_close (resource link): bool
474
470
* close krisp database */
475
471
PHP_FUNCTION (krisp_close )
476
472
{
@@ -515,7 +511,7 @@ PHP_FUNCTION(krisp_close)
515
511
}
516
512
/* }}} */
517
513
518
- /* {{{ proto (object) krisp_netmask (string start, string end)
514
+ /* {{{ proto krisp_netmask (string start, string end): object
519
515
* return netmask and prefix about given ip range */
520
516
PHP_FUNCTION (krisp_netmask )
521
517
{
@@ -581,23 +577,23 @@ static void krisp_network_broadcast (INTERNAL_FUNCTION_PARAMETERS, zend_bool typ
581
577
);
582
578
} // }}}
583
579
584
- /* {{{ proto (string|false) krisp_network (string ip, string mask)
580
+ /* {{{ proto krisp_network (string ip, string mask): string|false
585
581
* reuturn network address about given ip and network mask */
586
582
PHP_FUNCTION (krisp_network )
587
583
{
588
584
krisp_network_broadcast (INTERNAL_FUNCTION_PARAM_PASSTHRU , 0 );
589
585
}
590
586
/* }}} */
591
587
592
- /* {{{ proto (string|false) krisp_broadcast (string ip, string mask)
588
+ /* {{{ proto krisp_broadcast (string ip, string mask): string|false
593
589
* reuturn broadcast address about given ip and network mask */
594
590
PHP_FUNCTION (krisp_broadcast )
595
591
{
596
592
krisp_network_broadcast (INTERNAL_FUNCTION_PARAM_PASSTHRU , 1 );
597
593
}
598
594
/* }}} */
599
595
600
- /* {{{ proto (string) krisp_prefix2mask (int prefix)
596
+ /* {{{ proto krisp_prefix2mask (int prefix): string
601
597
* return unsigned long value for given network prefix */
602
598
PHP_FUNCTION (krisp_prefix2mask )
603
599
{
@@ -611,7 +607,7 @@ PHP_FUNCTION(krisp_prefix2mask)
611
607
}
612
608
/* }}} */
613
609
614
- /* {{{ proto (int) krisp_mask2prefix (string mask)
610
+ /* {{{ proto krisp_mask2prefix (string mask): long
615
611
* return short network prefix for given long network mask */
616
612
PHP_FUNCTION (krisp_mask2prefix )
617
613
{
@@ -624,7 +620,7 @@ PHP_FUNCTION(krisp_mask2prefix)
624
620
}
625
621
/* }}} */
626
622
627
- /* {{{ proto (bool) krisp_set_mtime_interval (resoruce link, int sec)
623
+ /* {{{ proto krisp_set_mtime_interval (resource link, int sec): bool
628
624
* set krisp database mtime check interval */
629
625
PHP_FUNCTION (krisp_set_mtime_interval )
630
626
{
@@ -665,7 +661,7 @@ PHP_FUNCTION(krisp_set_mtime_interval)
665
661
}
666
662
/* }}} */
667
663
668
- /* {{{ proto (bool) krisp_set_debug (resoruce link[ , int switch = true])
664
+ /* {{{ proto krisp_set_debug (resource link, int switch = true): bool
669
665
* print libkrisp debug messages */
670
666
PHP_FUNCTION (krisp_set_debug )
671
667
{
0 commit comments