Florian Weimer
2007-09-07 09:43:21 UTC
Is there an easy way to get a char * argument which is set to NULL
when the passed scalar is undefined?
Currently, I'm using
typedef char *crypt_gnutls_string;
and the following typemap entries:
crypt_gnutls_string T_GNUTLS_STRING
T_GNUTLS_STRING
$var = SvOK($arg) ? SvPV_nolen($arg) : NULL;
This works, but I wonder if there is a built-in solution.
when the passed scalar is undefined?
Currently, I'm using
typedef char *crypt_gnutls_string;
and the following typemap entries:
crypt_gnutls_string T_GNUTLS_STRING
T_GNUTLS_STRING
$var = SvOK($arg) ? SvPV_nolen($arg) : NULL;
This works, but I wonder if there is a built-in solution.
--
Florian Weimer <***@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
Florian Weimer <***@bfk.de>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99