| 1 |
|
| #define PERL_constant_NOTFOUND 1 |
| 2 |
|
| #define PERL_constant_NOTDEF 2 |
| 3 |
|
| #define PERL_constant_ISIV 3 |
| 4 |
|
| #define PERL_constant_ISNO 4 |
| 5 |
|
| #define PERL_constant_ISNV 5 |
| 6 |
|
| #define PERL_constant_ISPV 6 |
| 7 |
|
| #define PERL_constant_ISPVN 7 |
| 8 |
|
| #define PERL_constant_ISSV 8 |
| 9 |
|
| #define PERL_constant_ISUNDEF 9 |
| 10 |
|
| #define PERL_constant_ISUV 10 |
| 11 |
|
| #define PERL_constant_ISYES 11 |
| 12 |
|
| |
| 13 |
|
| #ifndef NVTYPE |
| 14 |
|
| typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */ |
| 15 |
|
| #endif |
| 16 |
|
| #ifndef aTHX_ |
| 17 |
|
| #define aTHX_ /* 5.6 or later define this for threading support. */ |
| 18 |
|
| #endif |
| 19 |
|
| #ifndef pTHX_ |
| 20 |
|
| #define pTHX_ /* 5.6 or later define this for threading support. */ |
| 21 |
|
| #endif |
| 22 |
|
| |
| 23 |
|
| static int |
| 24 |
11 |
| constant_7 (pTHX_ const char *name, IV *iv_return) { |
| 25 |
|
| /* When generated this function returned values for the list of names given |
| 26 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 27 |
|
| AF_TIPC PF_TIPC TIPC_OK */ |
| 28 |
|
| /* Offset 0 gives the best switch position. */ |
| 29 |
11 |
| switch (*name++) { |
| 30 |
2 |
| case 'A': |
| 31 |
2 |
▶ | if (memEQ(name, "F_TIPC", 6)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "F_TIPC", 6)) { |
2 |
0 |
2 |
|
| 32 |
|
| /* A */ |
| 33 |
|
| #ifdef AF_TIPC |
| 34 |
2 |
| *iv_return = AF_TIPC; |
| 35 |
2 |
| return PERL_constant_ISIV; |
| 36 |
|
| #else |
| 37 |
|
| return PERL_constant_NOTDEF; |
| 38 |
|
| #endif |
| 39 |
|
| } |
| 40 |
0 |
| break; |
| 41 |
8 |
| case 'P': |
| 42 |
8 |
▶ | if (memEQ(name, "F_TIPC", 6)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "F_TIPC", 6)) { |
8 |
0 |
8 |
|
| 43 |
|
| /* P */ |
| 44 |
|
| #ifdef PF_TIPC |
| 45 |
8 |
| *iv_return = PF_TIPC; |
| 46 |
8 |
| return PERL_constant_ISIV; |
| 47 |
|
| #else |
| 48 |
|
| return PERL_constant_NOTDEF; |
| 49 |
|
| #endif |
| 50 |
|
| } |
| 51 |
0 |
| break; |
| 52 |
1 |
| case 'T': |
| 53 |
1 |
▶ | if (memEQ(name, "IPC_OK", 6)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "IPC_OK", 6)) { |
1 |
0 |
1 |
|
| 54 |
|
| /* T */ |
| 55 |
|
| #ifdef TIPC_OK |
| 56 |
1 |
| *iv_return = TIPC_OK; |
| 57 |
1 |
| return PERL_constant_ISIV; |
| 58 |
|
| #else |
| 59 |
|
| return PERL_constant_NOTDEF; |
| 60 |
|
| #endif |
| 61 |
|
| } |
| 62 |
0 |
| break; |
| 63 |
|
| } |
| 64 |
0 |
| return PERL_constant_NOTFOUND; |
| 65 |
|
| } |
| 66 |
|
| |
| 67 |
|
| static int |
| 68 |
5 |
| constant_12 (pTHX_ const char *name, IV *iv_return) { |
| 69 |
|
| /* When generated this function returned values for the list of names given |
| 70 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 71 |
|
| TIPC_ADDR_ID TIPC_CFG_SRV TIPC_ERRINFO TIPC_RETDATA TIPC_TOP_SRV */ |
| 72 |
|
| /* Offset 6 gives the best switch position. */ |
| 73 |
5 |
| switch (name[6]) { |
| 74 |
1 |
| case 'D': |
| 75 |
1 |
▶ | if (memEQ(name, "TIPC_ADDR_ID", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ADDR_ID", 12)) { |
1 |
0 |
1 |
|
| 76 |
|
| /* ^ */ |
| 77 |
|
| #ifdef TIPC_ADDR_ID |
| 78 |
1 |
| *iv_return = TIPC_ADDR_ID; |
| 79 |
1 |
| return PERL_constant_ISIV; |
| 80 |
|
| #else |
| 81 |
|
| return PERL_constant_NOTDEF; |
| 82 |
|
| #endif |
| 83 |
|
| } |
| 84 |
0 |
| break; |
| 85 |
1 |
| case 'E': |
| 86 |
1 |
▶ | if (memEQ(name, "TIPC_RETDATA", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_RETDATA", 12)) { |
1 |
0 |
1 |
|
| 87 |
|
| /* ^ */ |
| 88 |
|
| #ifdef TIPC_RETDATA |
| 89 |
1 |
| *iv_return = TIPC_RETDATA; |
| 90 |
1 |
| return PERL_constant_ISIV; |
| 91 |
|
| #else |
| 92 |
|
| return PERL_constant_NOTDEF; |
| 93 |
|
| #endif |
| 94 |
|
| } |
| 95 |
0 |
| break; |
| 96 |
1 |
| case 'F': |
| 97 |
1 |
▶ | if (memEQ(name, "TIPC_CFG_SRV", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_CFG_SRV", 12)) { |
1 |
0 |
1 |
|
| 98 |
|
| /* ^ */ |
| 99 |
|
| #ifdef TIPC_CFG_SRV |
| 100 |
1 |
| *iv_return = TIPC_CFG_SRV; |
| 101 |
1 |
| return PERL_constant_ISIV; |
| 102 |
|
| #else |
| 103 |
|
| return PERL_constant_NOTDEF; |
| 104 |
|
| #endif |
| 105 |
|
| } |
| 106 |
0 |
| break; |
| 107 |
1 |
| case 'O': |
| 108 |
1 |
▶ | if (memEQ(name, "TIPC_TOP_SRV", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_TOP_SRV", 12)) { |
1 |
0 |
1 |
|
| 109 |
|
| /* ^ */ |
| 110 |
|
| #ifdef TIPC_TOP_SRV |
| 111 |
1 |
| *iv_return = TIPC_TOP_SRV; |
| 112 |
1 |
| return PERL_constant_ISIV; |
| 113 |
|
| #else |
| 114 |
|
| return PERL_constant_NOTDEF; |
| 115 |
|
| #endif |
| 116 |
|
| } |
| 117 |
0 |
| break; |
| 118 |
1 |
| case 'R': |
| 119 |
1 |
▶ | if (memEQ(name, "TIPC_ERRINFO", 12)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ERRINFO", 12)) { |
1 |
0 |
1 |
|
| 120 |
|
| /* ^ */ |
| 121 |
|
| #ifdef TIPC_ERRINFO |
| 122 |
1 |
| *iv_return = TIPC_ERRINFO; |
| 123 |
1 |
| return PERL_constant_ISIV; |
| 124 |
|
| #else |
| 125 |
|
| return PERL_constant_NOTDEF; |
| 126 |
|
| #endif |
| 127 |
|
| } |
| 128 |
0 |
| break; |
| 129 |
|
| } |
| 130 |
0 |
| return PERL_constant_NOTFOUND; |
| 131 |
|
| } |
| 132 |
|
| |
| 133 |
|
| static int |
| 134 |
5 |
| constant_14 (pTHX_ const char *name, IV *iv_return) { |
| 135 |
|
| /* When generated this function returned values for the list of names given |
| 136 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 137 |
|
| TIPC_ADDR_NAME TIPC_PUBLISHED TIPC_SUB_PORTS TIPC_WITHDRAWN */ |
| 138 |
|
| /* Offset 10 gives the best switch position. */ |
| 139 |
5 |
| switch (name[10]) { |
| 140 |
2 |
| case 'N': |
| 141 |
2 |
▶ | if (memEQ(name, "TIPC_ADDR_NAME", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ADDR_NAME", 14)) { |
2 |
0 |
2 |
|
| 142 |
|
| /* ^ */ |
| 143 |
|
| #ifdef TIPC_ADDR_NAME |
| 144 |
2 |
| *iv_return = TIPC_ADDR_NAME; |
| 145 |
2 |
| return PERL_constant_ISIV; |
| 146 |
|
| #else |
| 147 |
|
| return PERL_constant_NOTDEF; |
| 148 |
|
| #endif |
| 149 |
|
| } |
| 150 |
0 |
| break; |
| 151 |
1 |
| case 'O': |
| 152 |
1 |
▶ | if (memEQ(name, "TIPC_SUB_PORTS", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_SUB_PORTS", 14)) { |
1 |
0 |
1 |
|
| 153 |
|
| /* ^ */ |
| 154 |
|
| #ifdef TIPC_SUB_PORTS |
| 155 |
1 |
| *iv_return = TIPC_SUB_PORTS; |
| 156 |
1 |
| return PERL_constant_ISIV; |
| 157 |
|
| #else |
| 158 |
|
| return PERL_constant_NOTDEF; |
| 159 |
|
| #endif |
| 160 |
|
| } |
| 161 |
0 |
| break; |
| 162 |
1 |
| case 'R': |
| 163 |
1 |
▶ | if (memEQ(name, "TIPC_WITHDRAWN", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_WITHDRAWN", 14)) { |
1 |
0 |
1 |
|
| 164 |
|
| /* ^ */ |
| 165 |
|
| #ifdef TIPC_WITHDRAWN |
| 166 |
1 |
| *iv_return = TIPC_WITHDRAWN; |
| 167 |
1 |
| return PERL_constant_ISIV; |
| 168 |
|
| #else |
| 169 |
|
| return PERL_constant_NOTDEF; |
| 170 |
|
| #endif |
| 171 |
|
| } |
| 172 |
0 |
| break; |
| 173 |
1 |
| case 'S': |
| 174 |
1 |
▶ | if (memEQ(name, "TIPC_PUBLISHED", 14)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_PUBLISHED", 14)) { |
1 |
0 |
1 |
|
| 175 |
|
| /* ^ */ |
| 176 |
|
| #ifdef TIPC_PUBLISHED |
| 177 |
1 |
| *iv_return = TIPC_PUBLISHED; |
| 178 |
1 |
| return PERL_constant_ISIV; |
| 179 |
|
| #else |
| 180 |
|
| return PERL_constant_NOTDEF; |
| 181 |
|
| #endif |
| 182 |
|
| } |
| 183 |
0 |
| break; |
| 184 |
|
| } |
| 185 |
0 |
| return PERL_constant_NOTFOUND; |
| 186 |
|
| } |
| 187 |
|
| |
| 188 |
|
| static int |
| 189 |
6 |
| constant_15 (pTHX_ const char *name, IV *iv_return) { |
| 190 |
|
| /* When generated this function returned values for the list of names given |
| 191 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 192 |
|
| TIPC_ADDR_MCAST TIPC_IMPORTANCE TIPC_NODE_SCOPE TIPC_ZONE_SCOPE */ |
| 193 |
|
| /* Offset 5 gives the best switch position. */ |
| 194 |
6 |
| switch (name[5]) { |
| 195 |
1 |
| case 'A': |
| 196 |
1 |
▶ | if (memEQ(name, "TIPC_ADDR_MCAST", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ADDR_MCAST", 15)) { |
1 |
0 |
1 |
|
| 197 |
|
| /* ^ */ |
| 198 |
|
| #ifdef TIPC_ADDR_MCAST |
| 199 |
1 |
| *iv_return = TIPC_ADDR_MCAST; |
| 200 |
1 |
| return PERL_constant_ISIV; |
| 201 |
|
| #else |
| 202 |
|
| return PERL_constant_NOTDEF; |
| 203 |
|
| #endif |
| 204 |
|
| } |
| 205 |
0 |
| break; |
| 206 |
1 |
| case 'I': |
| 207 |
1 |
▶ | if (memEQ(name, "TIPC_IMPORTANCE", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_IMPORTANCE", 15)) { |
1 |
0 |
1 |
|
| 208 |
|
| /* ^ */ |
| 209 |
|
| #ifdef TIPC_IMPORTANCE |
| 210 |
1 |
| *iv_return = TIPC_IMPORTANCE; |
| 211 |
1 |
| return PERL_constant_ISIV; |
| 212 |
|
| #else |
| 213 |
|
| return PERL_constant_NOTDEF; |
| 214 |
|
| #endif |
| 215 |
|
| } |
| 216 |
0 |
| break; |
| 217 |
2 |
| case 'N': |
| 218 |
2 |
▶ | if (memEQ(name, "TIPC_NODE_SCOPE", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_NODE_SCOPE", 15)) { |
2 |
0 |
2 |
|
| 219 |
|
| /* ^ */ |
| 220 |
|
| #ifdef TIPC_NODE_SCOPE |
| 221 |
|
| *iv_return = TIPC_NODE_SCOPE; |
| 222 |
|
| return PERL_constant_ISIV; |
| 223 |
|
| #else |
| 224 |
2 |
| return PERL_constant_NOTDEF; |
| 225 |
|
| #endif |
| 226 |
|
| } |
| 227 |
0 |
| break; |
| 228 |
2 |
| case 'Z': |
| 229 |
2 |
▶ | if (memEQ(name, "TIPC_ZONE_SCOPE", 15)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ZONE_SCOPE", 15)) { |
2 |
0 |
2 |
|
| 230 |
|
| /* ^ */ |
| 231 |
|
| #ifdef TIPC_ZONE_SCOPE |
| 232 |
2 |
| *iv_return = TIPC_ZONE_SCOPE; |
| 233 |
2 |
| return PERL_constant_ISIV; |
| 234 |
|
| #else |
| 235 |
|
| return PERL_constant_NOTDEF; |
| 236 |
|
| #endif |
| 237 |
|
| } |
| 238 |
0 |
| break; |
| 239 |
|
| } |
| 240 |
0 |
| return PERL_constant_NOTFOUND; |
| 241 |
|
| } |
| 242 |
|
| |
| 243 |
|
| static int |
| 244 |
4 |
| constant_16 (pTHX_ const char *name, IV *iv_return) { |
| 245 |
|
| /* When generated this function returned values for the list of names given |
| 246 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 247 |
|
| TIPC_ERR_NO_NAME TIPC_ERR_NO_NODE TIPC_ERR_NO_PORT TIPC_SUB_SERVICE */ |
| 248 |
|
| /* Offset 14 gives the best switch position. */ |
| 249 |
4 |
| switch (name[14]) { |
| 250 |
1 |
| case 'C': |
| 251 |
1 |
▶ | if (memEQ(name, "TIPC_SUB_SERVICE", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_SUB_SERVICE", 16)) { |
1 |
0 |
1 |
|
| 252 |
|
| /* ^ */ |
| 253 |
|
| #ifdef TIPC_SUB_SERVICE |
| 254 |
1 |
| *iv_return = TIPC_SUB_SERVICE; |
| 255 |
1 |
| return PERL_constant_ISIV; |
| 256 |
|
| #else |
| 257 |
|
| return PERL_constant_NOTDEF; |
| 258 |
|
| #endif |
| 259 |
|
| } |
| 260 |
0 |
| break; |
| 261 |
1 |
| case 'D': |
| 262 |
1 |
▶ | if (memEQ(name, "TIPC_ERR_NO_NODE", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ERR_NO_NODE", 16)) { |
1 |
0 |
1 |
|
| 263 |
|
| /* ^ */ |
| 264 |
|
| #ifdef TIPC_ERR_NO_NODE |
| 265 |
1 |
| *iv_return = TIPC_ERR_NO_NODE; |
| 266 |
1 |
| return PERL_constant_ISIV; |
| 267 |
|
| #else |
| 268 |
|
| return PERL_constant_NOTDEF; |
| 269 |
|
| #endif |
| 270 |
|
| } |
| 271 |
0 |
| break; |
| 272 |
1 |
| case 'M': |
| 273 |
1 |
▶ | if (memEQ(name, "TIPC_ERR_NO_NAME", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ERR_NO_NAME", 16)) { |
1 |
0 |
1 |
|
| 274 |
|
| /* ^ */ |
| 275 |
|
| #ifdef TIPC_ERR_NO_NAME |
| 276 |
1 |
| *iv_return = TIPC_ERR_NO_NAME; |
| 277 |
1 |
| return PERL_constant_ISIV; |
| 278 |
|
| #else |
| 279 |
|
| return PERL_constant_NOTDEF; |
| 280 |
|
| #endif |
| 281 |
|
| } |
| 282 |
0 |
| break; |
| 283 |
1 |
| case 'R': |
| 284 |
1 |
▶ | if (memEQ(name, "TIPC_ERR_NO_PORT", 16)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ERR_NO_PORT", 16)) { |
1 |
0 |
1 |
|
| 285 |
|
| /* ^ */ |
| 286 |
|
| #ifdef TIPC_ERR_NO_PORT |
| 287 |
1 |
| *iv_return = TIPC_ERR_NO_PORT; |
| 288 |
1 |
| return PERL_constant_ISIV; |
| 289 |
|
| #else |
| 290 |
|
| return PERL_constant_NOTDEF; |
| 291 |
|
| #endif |
| 292 |
|
| } |
| 293 |
0 |
| break; |
| 294 |
|
| } |
| 295 |
0 |
| return PERL_constant_NOTFOUND; |
| 296 |
|
| } |
| 297 |
|
| |
| 298 |
|
| static int |
| 299 |
4 |
| constant_17 (pTHX_ const char *name, IV *iv_return) { |
| 300 |
|
| /* When generated this function returned values for the list of names given |
| 301 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 302 |
|
| TIPC_ADDR_NAMESEQ TIPC_CONN_TIMEOUT TIPC_ERR_OVERLOAD TIPC_WAIT_FOREVER */ |
| 303 |
|
| /* Offset 7 gives the best switch position. */ |
| 304 |
4 |
| switch (name[7]) { |
| 305 |
1 |
| case 'D': |
| 306 |
1 |
▶ | if (memEQ(name, "TIPC_ADDR_NAMESEQ", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ADDR_NAMESEQ", 17)) { |
1 |
0 |
1 |
|
| 307 |
|
| /* ^ */ |
| 308 |
|
| #ifdef TIPC_ADDR_NAMESEQ |
| 309 |
1 |
| *iv_return = TIPC_ADDR_NAMESEQ; |
| 310 |
1 |
| return PERL_constant_ISIV; |
| 311 |
|
| #else |
| 312 |
|
| return PERL_constant_NOTDEF; |
| 313 |
|
| #endif |
| 314 |
|
| } |
| 315 |
0 |
| break; |
| 316 |
1 |
| case 'I': |
| 317 |
1 |
▶ | if (memEQ(name, "TIPC_WAIT_FOREVER", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_WAIT_FOREVER", 17)) { |
1 |
0 |
1 |
|
| 318 |
|
| /* ^ */ |
| 319 |
|
| #ifdef TIPC_WAIT_FOREVER |
| 320 |
1 |
| *iv_return = TIPC_WAIT_FOREVER; |
| 321 |
1 |
| return PERL_constant_ISIV; |
| 322 |
|
| #else |
| 323 |
|
| return PERL_constant_NOTDEF; |
| 324 |
|
| #endif |
| 325 |
|
| } |
| 326 |
0 |
| break; |
| 327 |
1 |
| case 'N': |
| 328 |
1 |
▶ | if (memEQ(name, "TIPC_CONN_TIMEOUT", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_CONN_TIMEOUT", 17)) { |
1 |
0 |
1 |
|
| 329 |
|
| /* ^ */ |
| 330 |
|
| #ifdef TIPC_CONN_TIMEOUT |
| 331 |
1 |
| *iv_return = TIPC_CONN_TIMEOUT; |
| 332 |
1 |
| return PERL_constant_ISIV; |
| 333 |
|
| #else |
| 334 |
|
| return PERL_constant_NOTDEF; |
| 335 |
|
| #endif |
| 336 |
|
| } |
| 337 |
0 |
| break; |
| 338 |
1 |
| case 'R': |
| 339 |
1 |
▶ | if (memEQ(name, "TIPC_ERR_OVERLOAD", 17)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_ERR_OVERLOAD", 17)) { |
1 |
0 |
1 |
|
| 340 |
|
| /* ^ */ |
| 341 |
|
| #ifdef TIPC_ERR_OVERLOAD |
| 342 |
1 |
| *iv_return = TIPC_ERR_OVERLOAD; |
| 343 |
1 |
| return PERL_constant_ISIV; |
| 344 |
|
| #else |
| 345 |
|
| return PERL_constant_NOTDEF; |
| 346 |
|
| #endif |
| 347 |
|
| } |
| 348 |
0 |
| break; |
| 349 |
|
| } |
| 350 |
0 |
| return PERL_constant_NOTFOUND; |
| 351 |
|
| } |
| 352 |
|
| |
| 353 |
|
| static int |
| 354 |
4 |
| constant_18 (pTHX_ const char *name, IV *iv_return) { |
| 355 |
|
| /* When generated this function returned values for the list of names given |
| 356 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 357 |
|
| TIPC_CLUSTER_SCOPE TIPC_CONN_SHUTDOWN TIPC_SRC_DROPPABLE */ |
| 358 |
|
| /* Offset 14 gives the best switch position. */ |
| 359 |
4 |
| switch (name[14]) { |
| 360 |
1 |
| case 'A': |
| 361 |
1 |
▶ | if (memEQ(name, "TIPC_SRC_DROPPABLE", 18)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_SRC_DROPPABLE", 18)) { |
1 |
0 |
1 |
|
| 362 |
|
| /* ^ */ |
| 363 |
|
| #ifdef TIPC_SRC_DROPPABLE |
| 364 |
1 |
| *iv_return = TIPC_SRC_DROPPABLE; |
| 365 |
1 |
| return PERL_constant_ISIV; |
| 366 |
|
| #else |
| 367 |
|
| return PERL_constant_NOTDEF; |
| 368 |
|
| #endif |
| 369 |
|
| } |
| 370 |
0 |
| break; |
| 371 |
2 |
| case 'C': |
| 372 |
2 |
▶ | if (memEQ(name, "TIPC_CLUSTER_SCOPE", 18)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_CLUSTER_SCOPE", 18)) { |
2 |
0 |
2 |
|
| 373 |
|
| /* ^ */ |
| 374 |
|
| #ifdef TIPC_CLUSTER_SCOPE |
| 375 |
|
| *iv_return = TIPC_CLUSTER_SCOPE; |
| 376 |
|
| return PERL_constant_ISIV; |
| 377 |
|
| #else |
| 378 |
2 |
| return PERL_constant_NOTDEF; |
| 379 |
|
| #endif |
| 380 |
|
| } |
| 381 |
0 |
| break; |
| 382 |
1 |
| case 'D': |
| 383 |
1 |
▶ | if (memEQ(name, "TIPC_CONN_SHUTDOWN", 18)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_CONN_SHUTDOWN", 18)) { |
1 |
0 |
1 |
|
| 384 |
|
| /* ^ */ |
| 385 |
|
| #ifdef TIPC_CONN_SHUTDOWN |
| 386 |
1 |
| *iv_return = TIPC_CONN_SHUTDOWN; |
| 387 |
1 |
| return PERL_constant_ISIV; |
| 388 |
|
| #else |
| 389 |
|
| return PERL_constant_NOTDEF; |
| 390 |
|
| #endif |
| 391 |
|
| } |
| 392 |
0 |
| break; |
| 393 |
|
| } |
| 394 |
0 |
| return PERL_constant_NOTFOUND; |
| 395 |
|
| } |
| 396 |
|
| |
| 397 |
|
| static int |
| 398 |
5 |
| constant_19 (pTHX_ const char *name, IV *iv_return) { |
| 399 |
|
| /* When generated this function returned values for the list of names given |
| 400 |
|
| here. However, subsequent manual editing may have added or removed some. |
| 401 |
|
| TIPC_DEST_DROPPABLE TIPC_LOW_IMPORTANCE TIPC_RESERVED_TYPES |
| 402 |
|
| TIPC_SUBSCR_TIMEOUT TIPC_SUB_SINGLE_EVT */ |
| 403 |
|
| /* Offset 16 gives the best switch position. */ |
| 404 |
5 |
| switch (name[16]) { |
| 405 |
1 |
| case 'B': |
| 406 |
1 |
▶ | if (memEQ(name, "TIPC_DEST_DROPPABLE", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_DEST_DROPPABLE", 19)) { |
1 |
0 |
1 |
|
| 407 |
|
| /* ^ */ |
| 408 |
|
| #ifdef TIPC_DEST_DROPPABLE |
| 409 |
1 |
| *iv_return = TIPC_DEST_DROPPABLE; |
| 410 |
1 |
| return PERL_constant_ISIV; |
| 411 |
|
| #else |
| 412 |
|
| return PERL_constant_NOTDEF; |
| 413 |
|
| #endif |
| 414 |
|
| } |
| 415 |
0 |
| break; |
| 416 |
1 |
| case 'E': |
| 417 |
1 |
▶ | if (memEQ(name, "TIPC_SUB_SINGLE_EVT", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_SUB_SINGLE_EVT", 19)) { |
1 |
0 |
1 |
|
| 418 |
|
| /* ^ */ |
| 419 |
|
| #ifdef TIPC_SUB_SINGLE_EVT |
| 420 |
|
| *iv_return = TIPC_SUB_SINGLE_EVT; |
| 421 |
|
| return PERL_constant_ISIV; |
| 422 |
|
| #else |
| 423 |
1 |
| return PERL_constant_NOTDEF; |
| 424 |
|
| #endif |
| 425 |
|
| } |
| 426 |
0 |
| break; |
| 427 |
1 |
| case 'N': |
| 428 |
1 |
▶ | if (memEQ(name, "TIPC_LOW_IMPORTANCE", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_LOW_IMPORTANCE", 19)) { |
1 |
0 |
1 |
|
| 429 |
|
| /* ^ */ |
| 430 |
|
| #ifdef TIPC_LOW_IMPORTANCE |
| 431 |
1 |
| *iv_return = TIPC_LOW_IMPORTANCE; |
| 432 |
1 |
| return PERL_constant_ISIV; |
| 433 |
|
| #else |
| 434 |
|
| return PERL_constant_NOTDEF; |
| 435 |
|
| #endif |
| 436 |
|
| } |
| 437 |
0 |
| break; |
| 438 |
1 |
| case 'O': |
| 439 |
1 |
▶ | if (memEQ(name, "TIPC_SUBSCR_TIMEOUT", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_SUBSCR_TIMEOUT", 19)) { |
1 |
0 |
1 |
|
| 440 |
|
| /* ^ */ |
| 441 |
|
| #ifdef TIPC_SUBSCR_TIMEOUT |
| 442 |
1 |
| *iv_return = TIPC_SUBSCR_TIMEOUT; |
| 443 |
1 |
| return PERL_constant_ISIV; |
| 444 |
|
| #else |
| 445 |
|
| return PERL_constant_NOTDEF; |
| 446 |
|
| #endif |
| 447 |
|
| } |
| 448 |
0 |
| break; |
| 449 |
1 |
| case 'P': |
| 450 |
1 |
▶ | if (memEQ(name, "TIPC_RESERVED_TYPES", 19)) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (memEQ(name, "TIPC_RESERVED_TYPES", 19)) { |
1 |
0 |
1 |
|
| 451 |
|
| /* ^ */ |
| 452 |
|
| #ifdef TIPC_RESERVED_TYPES |
| 453 |
1 |
| *iv_return = TIPC_RESERVED_TYPES; |
| 454 |
1 |
| return PERL_constant_ISIV; |
| 455 |
|
| #else |
| 456 |
|
| return PERL_constant_NOTDEF; |
| 457 |
|
| #endif |
| 458 |
|
| } |
| 459 |
0 |
| break; |
| 460 |
|
| } |
| 461 |
0 |
| return PERL_constant_NOTFOUND; |
| 462 |
|
| } |
| 463 |
|
| |
| 464 |
|
| static int |
| 465 |
52 |
| constant (pTHX_ const char *name, STRLEN len, IV *iv_return) { |
| 466 |
|
| /* Initially switch on the length of the name. */ |
| 467 |
|
| /* When generated this function returned values for the list of names given |
| 468 |
|
| in this section of perl code. Rather than manually editing these functions |
| 469 |
|
| to add or remove constants, which would result in this comment and section |
| 470 |
|
| of code becoming inaccurate, we recommend that you edit this section of |
| 471 |
|
| code, and use it to regenerate a new set of constant functions which you |
| 472 |
|
| then use to replace the originals. |
| 473 |
|
| |
| 474 |
|
| Regenerate these constant functions by feeding this entire source file to |
| 475 |
|
| perl -x |
| 476 |
|
| |
| 477 |
|
| #!/usr/local/bin/perl -w |
| 478 |
|
| use ExtUtils::Constant qw (constant_types C_constant XS_constant); |
| 479 |
|
| |
| 480 |
|
| my $types = {map {($_, 1)} qw(IV)}; |
| 481 |
|
| my @names = (qw(AF_TIPC PF_TIPC SOL_TIPC TIPC_ADDR_ID TIPC_ADDR_MCAST |
| 482 |
|
| TIPC_ADDR_NAME TIPC_ADDR_NAMESEQ TIPC_CFG_SRV TIPC_CLUSTER_SCOPE |
| 483 |
|
| TIPC_CONN_SHUTDOWN TIPC_CONN_TIMEOUT TIPC_CRITICAL_IMPORTANCE |
| 484 |
|
| TIPC_DESTNAME TIPC_DEST_DROPPABLE TIPC_ERRINFO TIPC_ERR_NO_NAME |
| 485 |
|
| TIPC_ERR_NO_NODE TIPC_ERR_NO_PORT TIPC_ERR_OVERLOAD |
| 486 |
|
| TIPC_HIGH_IMPORTANCE TIPC_IMPORTANCE TIPC_LOW_IMPORTANCE |
| 487 |
|
| TIPC_MAX_USER_MSG_SIZE TIPC_MEDIUM_IMPORTANCE TIPC_NODE_SCOPE |
| 488 |
|
| TIPC_OK TIPC_PUBLISHED TIPC_RESERVED_TYPES TIPC_RETDATA |
| 489 |
|
| TIPC_SRC_DROPPABLE TIPC_SUBSCR_TIMEOUT TIPC_SUB_NO_BIND_EVTS |
| 490 |
|
| TIPC_SUB_NO_UNBIND_EVTS TIPC_SUB_PORTS TIPC_SUB_SERVICE |
| 491 |
|
| TIPC_SUB_SINGLE_EVT TIPC_TOP_SRV TIPC_WAIT_FOREVER |
| 492 |
|
| TIPC_WITHDRAWN TIPC_ZONE_SCOPE)); |
| 493 |
|
| |
| 494 |
|
| print constant_types(), "\n"; # macro defs |
| 495 |
|
| foreach (C_constant ("IO::Socket::TIPC", 'constant', 'IV', $types, undef, 3, @names) ) { |
| 496 |
|
| print $_, "\n"; # C constant subs |
| 497 |
|
| } |
| 498 |
|
| print "\n#### XS Section:\n"; |
| 499 |
|
| print XS_constant ("IO::Socket::TIPC", $types); |
| 500 |
|
| __END__ |