Debian Codegraph @

typemap

raw
1 TYPEMAP
2 BIGNUM * BIGNUM
3 const BIGNUM * BIGNUM
4 BN_CTX * T_PTRREF
5 const EC_METHOD * EC_METHOD
6 EC_GROUP * EC_GROUP
7 const EC_GROUP * EC_GROUP
8 EC_POINT * EC_POINT
9 const EC_POINT * EC_POINT
10 EC_KEY * EC_KEY
11 const EC_KEY * EC_KEY
12 BIO * T_PTRREF
13 point_conversion_form_t T_ENUM
14 const unsigned char * T_PV
15
16 INPUT
17 BIGNUM
18 if( ! SvROK( $arg ) ) { croak( \"argument is not an object\" ); }
19 $var = (${type}) SvIV( SvRV( $arg ) );
20
21 EC_METHOD
22 if( ! SvROK( $arg ) ) { croak( \"argument is not an object\" ); }
23 $var = (${type}) SvIV( SvRV( $arg ) );
24
25 EC_GROUP
26 if( ! SvROK( $arg ) ) { croak( \"argument is not an object\" ); }
27 $var = (${type}) SvIV( SvRV( $arg ) );
28
29 EC_POINT
30 if( ! SvROK( $arg ) ) { croak( \"argument is not an object\" ); }
31 $var = (${type}) SvIV( SvRV( $arg ) );
32
33 EC_KEY
34 if( ! SvROK( $arg ) ) { croak( \"argument is not an object\" ); }
35 $var = (${type}) SvIV( SvRV( $arg ) );
36
37
38 # These output types create blessed mortal references to EC pointers
39 # which ensures that you can call class methods on them and the DESTROY gets
40 # called when they go out of scope, for auto cleanup
41
42 OUTPUT
43 BIGNUM
44 sv_setsv($arg, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)$var ) ), gv_stashpv("Crypt::OpenSSL::Bignum",1))));
45
46 EC_METHOD
47 sv_setsv($arg, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)$var ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
48
49 EC_GROUP
50 sv_setsv($arg, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)$var ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
51
52 EC_POINT
53 sv_setsv($arg, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)$var ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
54
55 EC_KEY
56 sv_setsv($arg, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)$var ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_KEY",1))));
57