*** empty log message ***
[openssl.git] / perl / err.xs
1 #include "p5SSLeay.h"
2
3 int boot_err()
4         {
5         SSL_load_error_strings();
6         return(1);
7         }
8
9 MODULE =  SSLeay::ERR   PACKAGE = SSLeay::ERR   PREFIX = p5_ERR_
10
11 PROTOTYPES: ENABLE
12 VERSIONCHECK: DISABLE
13
14 #       md->error() - returns the last error in text or numeric context
15
16 void
17 p5_ERR_get_error(...)
18         PPCODE:
19                 char buf[512];
20                 unsigned long l;
21
22                 pr_name("p5_ERR_get_code");
23                 EXTEND(sp,1);
24                 PUSHs(sv_newmortal());
25                 l=ERR_get_error();
26                 ERR_error_string(l,buf);
27                 sv_setiv(ST(0),l);
28                 sv_setpv(ST(0),buf);
29                 SvIOK_on(ST(0));
30
31 void
32 p5_ERR_peek_error(...)
33         PPCODE:
34                 char buf[512];
35                 unsigned long l;
36
37                 pr_name("p5_ERR_get_code");
38                 EXTEND(sp,1);
39                 PUSHs(sv_newmortal());
40                 l=ERR_peek_error();
41                 ERR_error_string(l,buf);
42                 sv_setiv(ST(0),l);
43                 sv_setpv(ST(0),buf);
44                 SvIOK_on(ST(0));
45
46