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
14 typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it. */
17 #define aTHX_ /* 5.6 or later define this for threading support. */
20 #define pTHX_ /* 5.6 or later define this for threading support. */
24 constant_8 (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 OP_EIMPL OP_EREAD OP_FALSE */
28 /* Offset 7 gives the best switch position. */
31 if (memEQ(name, "OP_EREA", 7)) {
34 *iv_return = OP_EREAD;
35 return PERL_constant_ISIV;
37 return PERL_constant_NOTDEF;
42 if (memEQ(name, "OP_FALS", 7)) {
45 *iv_return = OP_FALSE;
46 return PERL_constant_ISIV;
48 return PERL_constant_NOTDEF;
53 if (memEQ(name, "OP_EIMP", 7)) {
56 *iv_return = OP_EIMPL;
57 return PERL_constant_ISIV;
59 return PERL_constant_NOTDEF;
64 return PERL_constant_NOTFOUND;
68 constant_13 (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 OP_EBADHEADER OP_EBADPACKET OP_ENOTFORMAT OP_TRACK_GAIN */
72 /* Offset 7 gives the best switch position. */
75 if (memEQ(name, "OP_ENOTFORMAT", 13)) {
78 *iv_return = OP_ENOTFORMAT;
79 return PERL_constant_ISIV;
81 return PERL_constant_NOTDEF;
86 if (memEQ(name, "OP_EBADHEADER", 13)) {
89 *iv_return = OP_EBADHEADER;
90 return PERL_constant_ISIV;
92 return PERL_constant_NOTDEF;
97 if (memEQ(name, "OP_TRACK_GAIN", 13)) {
100 *iv_return = OP_TRACK_GAIN;
101 return PERL_constant_ISIV;
103 return PERL_constant_NOTDEF;
108 if (memEQ(name, "OP_EBADPACKET", 13)) {
111 *iv_return = OP_EBADPACKET;
112 return PERL_constant_ISIV;
114 return PERL_constant_NOTDEF;
119 return PERL_constant_NOTFOUND;
123 constant_17 (pTHX_ const char *name, IV *iv_return) {
124 /* When generated this function returned values for the list of names given
125 here. However, subsequent manual editing may have added or removed some.
126 OP_PIC_FORMAT_GIF OP_PIC_FORMAT_PNG OP_PIC_FORMAT_URL */
127 /* Offset 16 gives the best switch position. */
130 if (memEQ(name, "OP_PIC_FORMAT_GI", 16)) {
132 #ifdef OP_PIC_FORMAT_GIF
133 *iv_return = OP_PIC_FORMAT_GIF;
134 return PERL_constant_ISIV;
136 return PERL_constant_NOTDEF;
141 if (memEQ(name, "OP_PIC_FORMAT_PN", 16)) {
143 #ifdef OP_PIC_FORMAT_PNG
144 *iv_return = OP_PIC_FORMAT_PNG;
145 return PERL_constant_ISIV;
147 return PERL_constant_NOTDEF;
152 if (memEQ(name, "OP_PIC_FORMAT_UR", 16)) {
154 #ifdef OP_PIC_FORMAT_URL
155 *iv_return = OP_PIC_FORMAT_URL;
156 return PERL_constant_ISIV;
158 return PERL_constant_NOTDEF;
163 return PERL_constant_NOTFOUND;
167 constant_26 (pTHX_ const char *name, IV *iv_return) {
168 /* When generated this function returned values for the list of names given
169 here. However, subsequent manual editing may have added or removed some.
170 OP_GET_SERVER_INFO_REQUEST OP_HTTP_PROXY_HOST_REQUEST
171 OP_HTTP_PROXY_PASS_REQUEST OP_HTTP_PROXY_PORT_REQUEST
172 OP_HTTP_PROXY_USER_REQUEST */
173 /* Offset 17 gives the best switch position. */
176 if (memEQ(name, "OP_GET_SERVER_INFO_REQUEST", 26)) {
178 #ifdef OP_GET_SERVER_INFO_REQUEST
179 *iv_return = OP_GET_SERVER_INFO_REQUEST;
180 return PERL_constant_ISIV;
182 return PERL_constant_NOTDEF;
187 if (memEQ(name, "OP_HTTP_PROXY_USER_REQUEST", 26)) {
189 #ifdef OP_HTTP_PROXY_USER_REQUEST
190 *iv_return = OP_HTTP_PROXY_USER_REQUEST;
191 return PERL_constant_ISIV;
193 return PERL_constant_NOTDEF;
198 if (memEQ(name, "OP_HTTP_PROXY_PASS_REQUEST", 26)) {
200 #ifdef OP_HTTP_PROXY_PASS_REQUEST
201 *iv_return = OP_HTTP_PROXY_PASS_REQUEST;
202 return PERL_constant_ISIV;
204 return PERL_constant_NOTDEF;
209 if (memEQ(name, "OP_HTTP_PROXY_HOST_REQUEST", 26)) {
211 #ifdef OP_HTTP_PROXY_HOST_REQUEST
212 *iv_return = OP_HTTP_PROXY_HOST_REQUEST;
213 return PERL_constant_ISIV;
215 return PERL_constant_NOTDEF;
218 if (memEQ(name, "OP_HTTP_PROXY_PORT_REQUEST", 26)) {
220 #ifdef OP_HTTP_PROXY_PORT_REQUEST
221 *iv_return = OP_HTTP_PROXY_PORT_REQUEST;
222 return PERL_constant_ISIV;
224 return PERL_constant_NOTDEF;
229 return PERL_constant_NOTFOUND;
233 constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
234 /* Initially switch on the length of the name. */
235 /* When generated this function returned values for the list of names given
236 in this section of perl code. Rather than manually editing these functions
237 to add or remove constants, which would result in this comment and section
238 of code becoming inaccurate, we recommend that you edit this section of
239 code, and use it to regenerate a new set of constant functions which you
240 then use to replace the originals.
242 Regenerate these constant functions by feeding this entire source file to
246 use ExtUtils::Constant qw (constant_types C_constant XS_constant);
248 my $types = {map {($_, 1)} qw(IV)};
249 my @names = (qw(OPUS_CHANNEL_COUNT_MAX OP_ABSOLUTE_GAIN OP_DEC_FORMAT_FLOAT
250 OP_DEC_FORMAT_SHORT OP_DEC_USE_DEFAULT OP_EBADHEADER OP_EBADLINK
251 OP_EBADPACKET OP_EBADTIMESTAMP OP_EFAULT OP_EIMPL OP_EINVAL
252 OP_ENOSEEK OP_ENOTAUDIO OP_ENOTFORMAT OP_EOF OP_EREAD
253 OP_EVERSION OP_FALSE OP_GET_SERVER_INFO_REQUEST OP_HEADER_GAIN
254 OP_HOLE OP_HTTP_PROXY_HOST_REQUEST OP_HTTP_PROXY_PASS_REQUEST
255 OP_HTTP_PROXY_PORT_REQUEST OP_HTTP_PROXY_USER_REQUEST
256 OP_PIC_FORMAT_GIF OP_PIC_FORMAT_JPEG OP_PIC_FORMAT_PNG
257 OP_PIC_FORMAT_UNKNOWN OP_PIC_FORMAT_URL
258 OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST OP_TRACK_GAIN));
260 print constant_types(), "\n"; # macro defs
261 foreach (C_constant ("Audio::Opusfile", 'constant', 'IV', $types, undef, 3, @names) ) {
262 print $_, "\n"; # C constant subs
264 print "\n#### XS Section:\n";
265 print XS_constant ("Audio::Opusfile", $types);
271 if (memEQ(name, "OP_EOF", 6)) {
274 return PERL_constant_ISIV;
276 return PERL_constant_NOTDEF;
281 if (memEQ(name, "OP_HOLE", 7)) {
283 *iv_return = OP_HOLE;
284 return PERL_constant_ISIV;
286 return PERL_constant_NOTDEF;
291 return constant_8 (aTHX_ name, iv_return);
294 /* Names all of length 9. */
295 /* OP_EFAULT OP_EINVAL */
296 /* Offset 6 gives the best switch position. */
299 if (memEQ(name, "OP_EFAULT", 9)) {
302 *iv_return = OP_EFAULT;
303 return PERL_constant_ISIV;
305 return PERL_constant_NOTDEF;
310 if (memEQ(name, "OP_EINVAL", 9)) {
313 *iv_return = OP_EINVAL;
314 return PERL_constant_ISIV;
316 return PERL_constant_NOTDEF;
323 if (memEQ(name, "OP_ENOSEEK", 10)) {
325 *iv_return = OP_ENOSEEK;
326 return PERL_constant_ISIV;
328 return PERL_constant_NOTDEF;
333 /* Names all of length 11. */
334 /* OP_EBADLINK OP_EVERSION */
335 /* Offset 9 gives the best switch position. */
338 if (memEQ(name, "OP_EBADLINK", 11)) {
341 *iv_return = OP_EBADLINK;
342 return PERL_constant_ISIV;
344 return PERL_constant_NOTDEF;
349 if (memEQ(name, "OP_EVERSION", 11)) {
352 *iv_return = OP_EVERSION;
353 return PERL_constant_ISIV;
355 return PERL_constant_NOTDEF;
362 if (memEQ(name, "OP_ENOTAUDIO", 12)) {
364 *iv_return = OP_ENOTAUDIO;
365 return PERL_constant_ISIV;
367 return PERL_constant_NOTDEF;
372 return constant_13 (aTHX_ name, iv_return);
375 if (memEQ(name, "OP_HEADER_GAIN", 14)) {
376 #ifdef OP_HEADER_GAIN
377 *iv_return = OP_HEADER_GAIN;
378 return PERL_constant_ISIV;
380 return PERL_constant_NOTDEF;
385 /* Names all of length 16. */
386 /* OP_ABSOLUTE_GAIN OP_EBADTIMESTAMP */
387 /* Offset 15 gives the best switch position. */
390 if (memEQ(name, "OP_ABSOLUTE_GAI", 15)) {
392 #ifdef OP_ABSOLUTE_GAIN
393 *iv_return = OP_ABSOLUTE_GAIN;
394 return PERL_constant_ISIV;
396 return PERL_constant_NOTDEF;
401 if (memEQ(name, "OP_EBADTIMESTAM", 15)) {
403 #ifdef OP_EBADTIMESTAMP
404 *iv_return = OP_EBADTIMESTAMP;
405 return PERL_constant_ISIV;
407 return PERL_constant_NOTDEF;
414 return constant_17 (aTHX_ name, iv_return);
417 /* Names all of length 18. */
418 /* OP_DEC_USE_DEFAULT OP_PIC_FORMAT_JPEG */
419 /* Offset 11 gives the best switch position. */
422 if (memEQ(name, "OP_PIC_FORMAT_JPEG", 18)) {
424 #ifdef OP_PIC_FORMAT_JPEG
425 *iv_return = OP_PIC_FORMAT_JPEG;
426 return PERL_constant_ISIV;
428 return PERL_constant_NOTDEF;
433 if (memEQ(name, "OP_DEC_USE_DEFAULT", 18)) {
435 #ifdef OP_DEC_USE_DEFAULT
436 *iv_return = OP_DEC_USE_DEFAULT;
437 return PERL_constant_ISIV;
439 return PERL_constant_NOTDEF;
446 /* Names all of length 19. */
447 /* OP_DEC_FORMAT_FLOAT OP_DEC_FORMAT_SHORT */
448 /* Offset 15 gives the best switch position. */
451 if (memEQ(name, "OP_DEC_FORMAT_SHORT", 19)) {
453 #ifdef OP_DEC_FORMAT_SHORT
454 *iv_return = OP_DEC_FORMAT_SHORT;
455 return PERL_constant_ISIV;
457 return PERL_constant_NOTDEF;
462 if (memEQ(name, "OP_DEC_FORMAT_FLOAT", 19)) {
464 #ifdef OP_DEC_FORMAT_FLOAT
465 *iv_return = OP_DEC_FORMAT_FLOAT;
466 return PERL_constant_ISIV;
468 return PERL_constant_NOTDEF;
475 if (memEQ(name, "OP_PIC_FORMAT_UNKNOWN", 21)) {
476 #ifdef OP_PIC_FORMAT_UNKNOWN
477 *iv_return = OP_PIC_FORMAT_UNKNOWN;
478 return PERL_constant_ISIV;
480 return PERL_constant_NOTDEF;
485 if (memEQ(name, "OPUS_CHANNEL_COUNT_MAX", 22)) {
486 #ifdef OPUS_CHANNEL_COUNT_MAX
487 *iv_return = OPUS_CHANNEL_COUNT_MAX;
488 return PERL_constant_ISIV;
490 return PERL_constant_NOTDEF;
495 return constant_26 (aTHX_ name, iv_return);
498 if (memEQ(name, "OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST", 37)) {
499 #ifdef OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST
500 *iv_return = OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST;
501 return PERL_constant_ISIV;
503 return PERL_constant_NOTDEF;
508 return PERL_constant_NOTFOUND;