| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#define PERL_NO_GET_CONTEXT |
|
2
|
|
|
|
|
|
|
#include "EXTERN.h" |
|
3
|
|
|
|
|
|
|
#include "perl.h" |
|
4
|
|
|
|
|
|
|
#include "XSUB.h" |
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
#include "ppport.h" |
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
int ge_frombytes_vartime(unsigned char *s); |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
MODULE = Solana::SPLAddress PACKAGE = Solana::SPLAddress |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
int |
|
14
|
|
|
|
|
|
|
check_pub_address_is_ok(SV* address) |
|
15
|
|
|
|
|
|
|
CODE: |
|
16
|
|
|
|
|
|
|
{ |
|
17
|
1
|
|
|
|
|
|
unsigned char* tmp = NULL; |
|
18
|
1
|
|
|
|
|
|
STRLEN len = 0; |
|
19
|
1
|
50
|
|
|
|
|
if (SvOK(address)) { |
|
20
|
1
|
|
|
|
|
|
tmp = (unsigned char*)SvPVbyte(address, len); |
|
21
|
|
|
|
|
|
|
} |
|
22
|
1
|
50
|
|
|
|
|
if (len != 32) croak("owner must be 32 bytes long"); |
|
23
|
|
|
|
|
|
|
|
|
24
|
1
|
50
|
|
|
|
|
RETVAL = ge_frombytes_vartime(tmp) != -1; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
OUTPUT: |
|
27
|
|
|
|
|
|
|
RETVAL |