
February 5th, 2013, 04:24 AM
|
|
Contributing User
|
|
Join Date: Jul 2003
Location: Prague, Czech Republic
|
|
|
Perl XS and null argument values
I need to write an interface to a tiny C library provided a collegue of mine.
I began to write the code like this:
Code:
int
verify(char *datafile,char *signfile,char *cacert);
CODE:
RETVAL=CLIB_verify(datafile,signfile,cacert);
RETURN:
RETVAL;
The trouble is with the NULL argument values which are not passed as NULL, but rather as empty (zero length).
1. How can I pass NULL argument values to the C function of CLIB_verify?
2. Is there a way to convert such zero length values to NULL centrally. Eg. in a typemap or do I have to declare/convert in every function where required?
Thank you.
|