source: swig/perl/language.i @ b099964

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change on this file since b099964 was 2a095a4, checked in by Mike Ryan <mikeryan@…>, 13 years ago

new method for writing certs/keys to file by name. lengthy explanation
why we needed to add this for Perl

  • Property mode set to 100644
File size: 880 bytes
Line 
1%{
2#include "SSL_keyid.h"
3%}
4
5%include "SSL_keyid.h"
6
7%include "chunk.i"
8
9%typemap(argout) bool &success {
10    --argvi;
11    SV *array = $result;
12
13    $result = sv_newmortal();
14    sv_setiv($result, *$1);
15    ++argvi;
16
17    $result = array;
18    ++argvi;
19}
20
21%typemap(in,numinputs=0) bool &success(bool temp) {
22    $1 = &temp;
23}
24
25// XXX We would love a typemap for FILE * in Perl, but that's not happening
26// anytime soon. It's hard (impossible?) to get a PerlIO * from a GV (glob).
27// If that were acquired, it's still funky getting a FILE * from that.
28//
29// See man perlapio for details, but you'd need:
30//
31// PerlIO_findFile(f)   // creates a FILE *
32// PerlIO_close()       // closes it
33//
34// Once you create it with findFILE, you need to close it once you are done
35// with it, so you'd need a typemap that gets called AFTER the function is done.
36//
37// Like I said, not happening.
Note: See TracBrowser for help on using the repository browser.