File: make_argcheck_aux.c.inc

package info (click to toggle)
libxs-parse-sublike-perl 0.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 516 kB
  • sloc: ansic: 944; perl: 930; sh: 6; makefile: 3
file content (24 lines) | stat: -rw-r--r-- 723 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* vi: set ft=c : */

#ifndef make_argcheck_aux

#define make_argcheck_aux(params, opt_params, slurpy)  S_make_argcheck_aux(aTHX_ params, opt_params, slurpy)
static inline UNOP_AUX_item *S_make_argcheck_aux(pTHX_ UV params, UV opt_params, char slurpy)
{
#  if HAVE_PERL_VERSION(5, 31, 5)
  struct op_argcheck_aux *aux = (struct op_argcheck_aux*)
    PerlMemShared_malloc(sizeof(struct op_argcheck_aux));
  aux->params     = params;
  aux->opt_params = opt_params;
  aux->slurpy     = slurpy;
  return (UNOP_AUX_item *)aux;
#  else
  UNOP_AUX_item *aux = (UNOP_AUX_item *)PerlMemShared_malloc(sizeof(UNOP_AUX_item) * 3);
  aux[0].iv = params;
  aux[1].iv = opt_params;
  aux[2].iv = slurpy;
  return aux;
#  endif
}

#endif