Re: streams, stderr/out and zend_fprintf ?
| From: | Sascha Schumann | Date: | Tue, 06 May 2003 19:37:28 +0000 |
| Subject: | Re: streams, stderr/out and zend_fprintf ? | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1321@lists.php.net to get a copy of this message | ||
Hans,
If you are talking to a serial device, just use posix
open. Handling resources is easy, the necessary API calls
boil down to this:
static int le_mcrypt;
le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor,
NULL, "mcrypt", module_number);
ZEND_REGISTER_RESOURCE (return_value, td, le_mcrypt);
ZEND_FETCH_RESOURCE (td, MCRYPT, mcryptind, -1, "MCrypt", le_mcrypt);
- Sascha