line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
void |
2
|
|
|
|
|
|
|
_p_constant(sv) |
3
|
|
|
|
|
|
|
PREINIT: |
4
|
|
|
|
|
|
|
#ifdef dXSTARG |
5
|
5
|
50
|
|
|
|
|
dXSTARG; /* Faster if we have it. */ |
6
|
|
|
|
|
|
|
#else |
7
|
|
|
|
|
|
|
dTARGET; |
8
|
|
|
|
|
|
|
#endif |
9
|
|
|
|
|
|
|
STRLEN len; |
10
|
|
|
|
|
|
|
int type; |
11
|
|
|
|
|
|
|
/* IV iv; Uncomment this if you need to return IVs */ |
12
|
|
|
|
|
|
|
/* NV nv; Uncomment this if you need to return NVs */ |
13
|
|
|
|
|
|
|
const char *pv; |
14
|
|
|
|
|
|
|
INPUT: |
15
|
|
|
|
|
|
|
SV * sv; |
16
|
|
|
|
|
|
|
const char * s = SvPV(sv, len); |
17
|
|
|
|
|
|
|
PPCODE: |
18
|
5
|
|
|
|
|
|
type = _message_property(aTHX_ s, len, &pv); |
19
|
|
|
|
|
|
|
/* Return 1 or 2 items. First is error message, or undef if no error. |
20
|
|
|
|
|
|
|
Second, if present, is found value */ |
21
|
5
|
|
|
|
|
|
switch (type) { |
22
|
|
|
|
|
|
|
case PERL_constant_NOTFOUND: |
23
|
0
|
|
|
|
|
|
sv = |
24
|
0
|
|
|
|
|
|
sv_2mortal(newSVpvf("%s is not a valid ZMQ::Raw::Message macro", s)); |
25
|
0
|
|
|
|
|
|
PUSHs(sv); |
26
|
0
|
|
|
|
|
|
break; |
27
|
|
|
|
|
|
|
case PERL_constant_NOTDEF: |
28
|
0
|
|
|
|
|
|
sv = sv_2mortal(newSVpvf( |
29
|
|
|
|
|
|
|
"Your vendor has not defined ZMQ::Raw::Message macro %s, used", |
30
|
|
|
|
|
|
|
s)); |
31
|
0
|
|
|
|
|
|
PUSHs(sv); |
32
|
0
|
|
|
|
|
|
break; |
33
|
|
|
|
|
|
|
/* Uncomment this if you need to return IVs |
34
|
|
|
|
|
|
|
case PERL_constant_ISIV: |
35
|
|
|
|
|
|
|
EXTEND(SP, 1); |
36
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
37
|
|
|
|
|
|
|
PUSHi(iv); |
38
|
|
|
|
|
|
|
break; */ |
39
|
|
|
|
|
|
|
/* Uncomment this if you need to return NOs |
40
|
|
|
|
|
|
|
case PERL_constant_ISNO: |
41
|
|
|
|
|
|
|
EXTEND(SP, 1); |
42
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
43
|
|
|
|
|
|
|
PUSHs(&PL_sv_no); |
44
|
|
|
|
|
|
|
break; */ |
45
|
|
|
|
|
|
|
/* Uncomment this if you need to return NVs |
46
|
|
|
|
|
|
|
case PERL_constant_ISNV: |
47
|
|
|
|
|
|
|
EXTEND(SP, 1); |
48
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
49
|
|
|
|
|
|
|
PUSHn(nv); |
50
|
|
|
|
|
|
|
break; */ |
51
|
|
|
|
|
|
|
case PERL_constant_ISPV: |
52
|
5
|
50
|
|
|
|
|
EXTEND(SP, 1); |
53
|
5
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
54
|
5
|
50
|
|
|
|
|
PUSHp(pv, strlen(pv)); |
55
|
5
|
|
|
|
|
|
break; |
56
|
|
|
|
|
|
|
/* Uncomment this if you need to return PVNs |
57
|
|
|
|
|
|
|
case PERL_constant_ISPVN: |
58
|
|
|
|
|
|
|
EXTEND(SP, 1); |
59
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
60
|
|
|
|
|
|
|
PUSHp(pv, iv); |
61
|
|
|
|
|
|
|
break; */ |
62
|
|
|
|
|
|
|
/* Uncomment this if you need to return SVs |
63
|
|
|
|
|
|
|
case PERL_constant_ISSV: |
64
|
|
|
|
|
|
|
EXTEND(SP, 1); |
65
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
66
|
|
|
|
|
|
|
PUSHs(sv); |
67
|
|
|
|
|
|
|
break; */ |
68
|
|
|
|
|
|
|
/* Uncomment this if you need to return UNDEFs |
69
|
|
|
|
|
|
|
case PERL_constant_ISUNDEF: |
70
|
|
|
|
|
|
|
break; */ |
71
|
|
|
|
|
|
|
/* Uncomment this if you need to return UVs |
72
|
|
|
|
|
|
|
case PERL_constant_ISUV: |
73
|
|
|
|
|
|
|
EXTEND(SP, 1); |
74
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
75
|
|
|
|
|
|
|
PUSHu((UV)iv); |
76
|
|
|
|
|
|
|
break; */ |
77
|
|
|
|
|
|
|
/* Uncomment this if you need to return YESs |
78
|
|
|
|
|
|
|
case PERL_constant_ISYES: |
79
|
|
|
|
|
|
|
EXTEND(SP, 1); |
80
|
|
|
|
|
|
|
PUSHs(&PL_sv_undef); |
81
|
|
|
|
|
|
|
PUSHs(&PL_sv_yes); |
82
|
|
|
|
|
|
|
break; */ |
83
|
|
|
|
|
|
|
default: |
84
|
0
|
|
|
|
|
|
sv = sv_2mortal(newSVpvf( |
85
|
|
|
|
|
|
|
"Unexpected return type %d while processing ZMQ::Raw::Message macro %s, used", |
86
|
|
|
|
|
|
|
type, s)); |
87
|
0
|
|
|
|
|
|
PUSHs(sv); |
88
|
|
|
|
|
|
|
} |