mirror of
https://github.com/pcsc-for-php/pcsc.git
synced 2026-08-08 21:09:26 +02:00
add missing arginfo (mandatory for PHP 8)
This commit is contained in:
parent
054ec3d5a3
commit
1d0a009e02
1 changed files with 42 additions and 10 deletions
52
pcsc.c
52
pcsc.c
|
|
@ -44,24 +44,49 @@ ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_connect_arginfo, 0, 0, 2)
|
|||
ZEND_ARG_INFO(1, active_protocol)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_void, 0, 0, 0)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_context, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, context)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_disconnect, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, card)
|
||||
ZEND_ARG_INFO(0, disposition)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_transmit, 0, 0, 2)
|
||||
ZEND_ARG_INFO(0, card)
|
||||
ZEND_ARG_INFO(0, command)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_card, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, card)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
ZEND_BEGIN_ARG_INFO_EX(php_pcsc_scard_errstr, 0, 0, 1)
|
||||
ZEND_ARG_INFO(0, errno)
|
||||
ZEND_END_ARG_INFO()
|
||||
|
||||
/* {{{ pcsc_functions[]
|
||||
*
|
||||
* Every user visible function must have an entry in pcsc_functions[].
|
||||
*/
|
||||
zend_function_entry pcsc_functions[] = {
|
||||
PHP_FE(scard_establish_context, NULL)
|
||||
PHP_FE(scard_release_context, NULL)
|
||||
PHP_FE(scard_is_valid_context, NULL)
|
||||
PHP_FE(scard_list_readers, NULL)
|
||||
PHP_FE(scard_establish_context, php_pcsc_scard_void)
|
||||
PHP_FE(scard_release_context, php_pcsc_scard_context)
|
||||
PHP_FE(scard_is_valid_context, php_pcsc_scard_context)
|
||||
PHP_FE(scard_list_readers, php_pcsc_scard_context)
|
||||
PHP_FE(scard_connect, php_pcsc_scard_connect_arginfo)
|
||||
//PHP_FE(scard_reconnect, NULL)
|
||||
PHP_FE(scard_disconnect, NULL)
|
||||
PHP_FE(scard_transmit, NULL)
|
||||
PHP_FE(scard_status, NULL)
|
||||
PHP_FE(scard_disconnect, php_pcsc_scard_disconnect)
|
||||
PHP_FE(scard_transmit, php_pcsc_scard_transmit)
|
||||
PHP_FE(scard_status, php_pcsc_scard_card)
|
||||
//PHP_FE(scard_get_status_change, NULL)
|
||||
PHP_FE(scard_last_errno, NULL)
|
||||
PHP_FE(scard_errstr, NULL)
|
||||
{NULL, NULL, NULL}
|
||||
PHP_FE(scard_last_errno, php_pcsc_scard_void)
|
||||
PHP_FE(scard_errstr, php_pcsc_scard_errstr)
|
||||
PHP_FE_END
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
|
|
@ -500,6 +525,10 @@ PHP_FUNCTION(scard_establish_context)
|
|||
SCARDCONTEXT scard_context = 0;
|
||||
LONG rc = 0;
|
||||
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
rc = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &scard_context);
|
||||
if (rc != SCARD_S_SUCCESS)
|
||||
{
|
||||
|
|
@ -796,6 +825,9 @@ PHP_FUNCTION(scard_status)
|
|||
Retrieve last error code */
|
||||
PHP_FUNCTION(scard_last_errno)
|
||||
{
|
||||
if (zend_parse_parameters_none() == FAILURE) {
|
||||
return;
|
||||
}
|
||||
RETURN_LONG(PCSC_G(last_errno));
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue