Alt-CWB-CL-ambs

 view release on metacpan or  search on metacpan

CL.typemap  view on Meta::CPAN

Corpus *	T_PTROBJ
Attribute *	T_PTRREF
PosAttrib	T_PTROBJ_CL
StrucAttrib	T_PTROBJ_CL
AlignAttrib	T_PTROBJ_CL

#############################################################################
INPUT
T_PTROBJ_CL
  if (sv_derived_from($arg, \"CWB::CL::${ntype}\")) {
    IV tmp = SvIV((SV*)SvRV($arg));
    $var = INT2PTR($type,tmp);
  }
  else {
    Perl_croak(aTHX_ \"$var is not of type CWB::CL::${ntype}\");
  }

#############################################################################
OUTPUT
T_PTROBJ_CL
  sv_setref_pv($arg, \"CWB::CL::${ntype}\", (void*)$var);

CL.xs  view on Meta::CPAN

    int error_code;
  CODE:
    /* return string with last CL error encountered in last method call ("" if last call was successful) */
    error_code = (last_cl_error != CDA_OK) ? last_cl_error : cderrno; /* after simple function invocation, use CL library error status */
    if (error_code == CDA_OK) {
      RETVAL = "";
    }
    else {
      RETVAL = cwb_cl_error_message(error_code); /* returns pointer to string constant */
    }
  OUTPUT:
    RETVAL

void
set_strict_mode(on_off)
    int on_off
  CODE:
    strict_mode = on_off;

int
get_strict_mode()
  CODE:
    RETVAL = strict_mode;
  OUTPUT:
    RETVAL

double
constant(name)
    char *  name

Corpus *
cl_new_corpus(registry_dir, registry_name)
    char *  registry_dir
    char *  registry_name

CL.xs  view on Meta::CPAN

    size = cl_set_size(s);
    if (size >= 0) {
      RETVAL = size;
    }
    else {
      last_cl_error = cderrno;
      if (strict_mode)
        croak_on_error(last_cl_error);
      XSRETURN_UNDEF;  /* return undefined value */
    }
  OUTPUT:
    RETVAL

Attribute *
cl_new_attribute(corpus, attribute_name, type)
    Corpus *    corpus
    char *  attribute_name
    int   type
  INIT:
    last_cl_error = CDA_OK;

CL.xs  view on Meta::CPAN

      }
      Safefree(list);
      if (strict_mode && last_cl_error != CDA_OK)
        croak_on_error(last_cl_error);
      if (RETVAL < 0)
        XSRETURN_UNDEF;
    }
    else {
      RETVAL = 0;
    }
  OUTPUT:
    RETVAL

void
cl_idlist2cpos(attribute, ...)
    PosAttrib   attribute
  PREINIT:
    int i, id, idlist_size, size, errors;
    int *idlist, *list;
  PPCODE:
    last_cl_error = CDA_OK;



( run in 0.414 second using v1.01-cache-2.11-cpan-4e96b696675 )