Audio-Opusfile

 view release on metacpan or  search on metacpan

fallback/const-c.inc  view on Meta::CPAN

#ifdef OP_EBADPACKET
      *iv_return = OP_EBADPACKET;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  }
  return PERL_constant_NOTFOUND;
}

static int
constant_17 (pTHX_ const char *name, IV *iv_return) {
  /* When generated this function returned values for the list of names given
     here.  However, subsequent manual editing may have added or removed some.
     OP_PIC_FORMAT_GIF OP_PIC_FORMAT_PNG OP_PIC_FORMAT_URL */
  /* Offset 16 gives the best switch position.  */
  switch (name[16]) {
  case 'F':
    if (memEQ(name, "OP_PIC_FORMAT_GI", 16)) {
    /*                               F      */
#ifdef OP_PIC_FORMAT_GIF
      *iv_return = OP_PIC_FORMAT_GIF;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 'G':
    if (memEQ(name, "OP_PIC_FORMAT_PN", 16)) {
    /*                               G      */
#ifdef OP_PIC_FORMAT_PNG
      *iv_return = OP_PIC_FORMAT_PNG;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 'L':
    if (memEQ(name, "OP_PIC_FORMAT_UR", 16)) {
    /*                               L      */
#ifdef OP_PIC_FORMAT_URL
      *iv_return = OP_PIC_FORMAT_URL;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  }
  return PERL_constant_NOTFOUND;
}

static int
constant_26 (pTHX_ const char *name, IV *iv_return) {
  /* When generated this function returned values for the list of names given
     here.  However, subsequent manual editing may have added or removed some.
     OP_GET_SERVER_INFO_REQUEST OP_HTTP_PROXY_HOST_REQUEST
     OP_HTTP_PROXY_PASS_REQUEST OP_HTTP_PROXY_PORT_REQUEST
     OP_HTTP_PROXY_USER_REQUEST */
  /* Offset 17 gives the best switch position.  */
  switch (name[17]) {
  case 'O':
    if (memEQ(name, "OP_GET_SERVER_INFO_REQUEST", 26)) {
    /*                                ^               */
#ifdef OP_GET_SERVER_INFO_REQUEST
      *iv_return = OP_GET_SERVER_INFO_REQUEST;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 'R':
    if (memEQ(name, "OP_HTTP_PROXY_USER_REQUEST", 26)) {
    /*                                ^               */
#ifdef OP_HTTP_PROXY_USER_REQUEST
      *iv_return = OP_HTTP_PROXY_USER_REQUEST;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 'S':
    if (memEQ(name, "OP_HTTP_PROXY_PASS_REQUEST", 26)) {
    /*                                ^               */
#ifdef OP_HTTP_PROXY_PASS_REQUEST
      *iv_return = OP_HTTP_PROXY_PASS_REQUEST;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 'T':
    if (memEQ(name, "OP_HTTP_PROXY_HOST_REQUEST", 26)) {
    /*                                ^               */
#ifdef OP_HTTP_PROXY_HOST_REQUEST
      *iv_return = OP_HTTP_PROXY_HOST_REQUEST;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    if (memEQ(name, "OP_HTTP_PROXY_PORT_REQUEST", 26)) {
    /*                                ^               */
#ifdef OP_HTTP_PROXY_PORT_REQUEST
      *iv_return = OP_HTTP_PROXY_PORT_REQUEST;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  }
  return PERL_constant_NOTFOUND;
}

static int
constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
  /* Initially switch on the length of the name.  */
  /* When generated this function returned values for the list of names given
     in this section of perl code.  Rather than manually editing these functions
     to add or remove constants, which would result in this comment and section
     of code becoming inaccurate, we recommend that you edit this section of
     code, and use it to regenerate a new set of constant functions which you
     then use to replace the originals.

     Regenerate these constant functions by feeding this entire source file to
     perl -x

#!/usr/bin/perl -w
use ExtUtils::Constant qw (constant_types C_constant XS_constant);

my $types = {map {($_, 1)} qw(IV)};
my @names = (qw(OPUS_CHANNEL_COUNT_MAX OP_ABSOLUTE_GAIN OP_DEC_FORMAT_FLOAT
	       OP_DEC_FORMAT_SHORT OP_DEC_USE_DEFAULT OP_EBADHEADER OP_EBADLINK
	       OP_EBADPACKET OP_EBADTIMESTAMP OP_EFAULT OP_EIMPL OP_EINVAL
	       OP_ENOSEEK OP_ENOTAUDIO OP_ENOTFORMAT OP_EOF OP_EREAD
	       OP_EVERSION OP_FALSE OP_GET_SERVER_INFO_REQUEST OP_HEADER_GAIN
	       OP_HOLE OP_HTTP_PROXY_HOST_REQUEST OP_HTTP_PROXY_PASS_REQUEST
	       OP_HTTP_PROXY_PORT_REQUEST OP_HTTP_PROXY_USER_REQUEST
	       OP_PIC_FORMAT_GIF OP_PIC_FORMAT_JPEG OP_PIC_FORMAT_PNG
	       OP_PIC_FORMAT_UNKNOWN OP_PIC_FORMAT_URL
	       OP_SSL_SKIP_CERTIFICATE_CHECK_REQUEST OP_TRACK_GAIN));

print constant_types(), "\n"; # macro defs
foreach (C_constant ("Audio::Opusfile", 'constant', 'IV', $types, undef, 3, @names) ) {
    print $_, "\n"; # C constant subs
}
print "\n#### XS Section:\n";
print XS_constant ("Audio::Opusfile", $types);
__END__
   */

  switch (len) {
  case 6:
    if (memEQ(name, "OP_EOF", 6)) {
#ifdef OP_EOF
      *iv_return = OP_EOF;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 7:
    if (memEQ(name, "OP_HOLE", 7)) {
#ifdef OP_HOLE
      *iv_return = OP_HOLE;
      return PERL_constant_ISIV;
#else
      return PERL_constant_NOTDEF;
#endif
    }
    break;
  case 8:
    return constant_8 (aTHX_ name, iv_return);
    break;
  case 9:
    /* Names all of length 9.  */
    /* OP_EFAULT OP_EINVAL */
    /* Offset 6 gives the best switch position.  */
    switch (name[6]) {
    case 'U':
      if (memEQ(name, "OP_EFAULT", 9)) {
      /*                     ^        */
#ifdef OP_EFAULT
        *iv_return = OP_EFAULT;
        return PERL_constant_ISIV;
#else
        return PERL_constant_NOTDEF;
#endif
      }
      break;
    case 'V':
      if (memEQ(name, "OP_EINVAL", 9)) {
      /*                     ^        */
#ifdef OP_EINVAL
        *iv_return = OP_EINVAL;
        return PERL_constant_ISIV;
#else



( run in 0.467 second using v1.01-cache-2.11-cpan-71847e10f99 )