text: // pypointersmodule.c
  // This file is generated by Shroud nowrite-version. Do not edit.
  // Copyright (c) 2017-2021, Lawrence Livermore National Security, LLC and
  // other Shroud Project Developers.
  // See the top-level COPYRIGHT file for details.
  //
  // SPDX-License-Identifier: (BSD-3-Clause)
  //
  #include "pypointersmodule.h"
  #define PY_ARRAY_UNIQUE_SYMBOL SHROUD_POINTERS_ARRAY_API
  #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
  #include "numpy/arrayobject.h"
  
  // shroud
  #include <stdlib.h>
  
  // splicer begin include
  // splicer end include
  
  #ifdef __cplusplus
  #define SHROUD_UNUSED(param)
  #else
  #define SHROUD_UNUSED(param) param
  #endif
  
  #if PY_MAJOR_VERSION >= 3
  #define PyInt_AsLong PyLong_AsLong
  #define PyInt_FromLong PyLong_FromLong
  #define PyInt_FromSize_t PyLong_FromSize_t
  #define PyString_FromString PyUnicode_FromString
  #define PyString_FromStringAndSize PyUnicode_FromStringAndSize
  #endif
  
  // helper get_from_object_char
  // Converter from PyObject to char *.
  // The returned status will be 1 for a successful conversion
  // and 0 if the conversion has failed.
  // value.obj is unused.
  // value.dataobj - object which holds the data.
  // If same as obj argument, its refcount is incremented.
  // value.data is owned by value.dataobj and must be copied to be preserved.
  // Caller must use Py_XDECREF(value.dataobj).
  static int SHROUD_get_from_object_char(PyObject *obj,
      POI_SHROUD_converter_value *value)
  {
      size_t size = 0;
      char *out;
      if (PyUnicode_Check(obj)) {
  #if PY_MAJOR_VERSION >= 3
          PyObject *strobj = PyUnicode_AsUTF8String(obj);
          out = PyBytes_AS_STRING(strobj);
          size = PyBytes_GET_SIZE(strobj);
          value->dataobj = strobj;  // steal reference
  #else
          PyObject *strobj = PyUnicode_AsUTF8String(obj);
          out = PyString_AsString(strobj);
          size = PyString_Size(obj);
          value->dataobj = strobj;  // steal reference
  #endif
  #if PY_MAJOR_VERSION < 3
      } else if (PyString_Check(obj)) {
          out = PyString_AsString(obj);
          size = PyString_Size(obj);
          value->dataobj = obj;
          Py_INCREF(obj);
  #endif
      } else if (PyBytes_Check(obj)) {
          out = PyBytes_AS_STRING(obj);
          size = PyBytes_GET_SIZE(obj);
          value->dataobj = obj;
          Py_INCREF(obj);
      } else if (PyByteArray_Check(obj)) {
          out = PyByteArray_AS_STRING(obj);
          size = PyByteArray_GET_SIZE(obj);
          value->dataobj = obj;
          Py_INCREF(obj);
      } else if (obj == Py_None) {
          out = NULL;
          size = 0;
          value->dataobj = NULL;
      } else {
          PyErr_Format(PyExc_TypeError,
              "argument should be string or None, not %.200s",
              Py_TYPE(obj)->tp_name);
          return 0;
      }
      value->obj = NULL;
      value->data = out;
      value->size = size;
      return 1;
  }
  
  
  
  // helper FREE_get_from_object_charptr
  static void FREE_get_from_object_charptr(PyObject *obj)
  {
      char **in = (char **) PyCapsule_GetPointer(obj, NULL);
      if (in == NULL)
          return;
      size_t *size = (size_t *) PyCapsule_GetContext(obj);
      if (size == NULL)
          return;
      for (size_t i=0; i < *size; ++i) {
          if (in[i] == NULL)
              continue;
          free(in[i]);
      }
      free(in);
      free(size);
  }
  
  // helper get_from_object_charptr
  // Convert obj into an array of char * (i.e. char **).
  static int SHROUD_get_from_object_charptr(PyObject *obj,
      POI_SHROUD_converter_value *value)
  {
      PyObject *seq = PySequence_Fast(obj, "holder");
      if (seq == NULL) {
          PyErr_Format(PyExc_TypeError, "argument '%s' must be iterable",
              value->name);
          return -1;
      }
      Py_ssize_t size = PySequence_Fast_GET_SIZE(seq);
      char **in = (char **) calloc(size, sizeof(char *));
      PyObject *dataobj = PyCapsule_New(in, NULL, FREE_get_from_object_charptr);
      size_t *size_context = (size_t *) malloc(sizeof(size_t));
      *size_context = size;
      int ierr = PyCapsule_SetContext(dataobj, size_context);
      // XXX - check error
      POI_SHROUD_converter_value itemvalue = {NULL, NULL, NULL, NULL, 0};
      for (Py_ssize_t i = 0; i < size; i++) {
          PyObject *item = PySequence_Fast_GET_ITEM(seq, i);
          ierr = SHROUD_get_from_object_char(item, &itemvalue);
          if (ierr == 0) {
              Py_XDECREF(itemvalue.dataobj);
              Py_DECREF(dataobj);
              Py_DECREF(seq);
              PyErr_Format(PyExc_TypeError,
                  "argument '%s', index %d must be string", value->name,
                  (int) i);
              return 0;
          }
          if (itemvalue.data != NULL) {
              in[i] = strdup((char *) itemvalue.data);
          }
          Py_XDECREF(itemvalue.dataobj);
      }
      Py_DECREF(seq);
  
      value->obj = NULL;
      value->dataobj = dataobj;
      value->data = in;
      value->size = size;
      return 1;
  }
  
  // splicer begin C_definition
  // splicer end C_definition
  PyObject *PY_error_obj;
  // splicer begin additional_functions
  // splicer end additional_functions
  
  // ----------------------------------------
  // Function:  void intargs_in
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  const int * arg
  // Attrs:     +intent(in)
  // Exact:     py_native_*_in
  static char PY_intargs_in__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_intargs_in(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.intargs_in
      int arg;
      char *SHT_kwlist[] = {
          "arg",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:intargs_in",
          SHT_kwlist, &arg))
          return NULL;
  
      intargs_in(&arg);
      Py_RETURN_NONE;
  // splicer end function.intargs_in
  }
  
  // ----------------------------------------
  // Function:  void intargs_inout
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * arg
  // Attrs:     +intent(inout)
  // Exact:     py_native_*_inout
  static char PY_intargs_inout__doc__[] =
  "documentation"
  ;
  
  /**
   * Argument is modified by library, defaults to intent(inout).
   */
  static PyObject *
  PY_intargs_inout(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.intargs_inout
      int arg;
      char *SHT_kwlist[] = {
          "arg",
          NULL };
      PyObject * SHPy_arg = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:intargs_inout",
          SHT_kwlist, &arg))
          return NULL;
  
      intargs_inout(&arg);
  
      // post_call
      SHPy_arg = PyInt_FromLong(arg);
  
      return (PyObject *) SHPy_arg;
  // splicer end function.intargs_inout
  }
  
  // ----------------------------------------
  // Function:  void intargs_out
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * arg +intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  static char PY_intargs_out__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_intargs_out(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.intargs_out
      int arg;
      PyObject * SHPy_arg = NULL;
  
      intargs_out(&arg);
  
      // post_call
      SHPy_arg = PyInt_FromLong(arg);
  
      return (PyObject *) SHPy_arg;
  // splicer end function.intargs_out
  }
  
  // ----------------------------------------
  // Function:  void intargs
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  const int argin +intent(in)+value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  // ----------------------------------------
  // Argument:  int * arginout +intent(inout)
  // Attrs:     +intent(inout)
  // Exact:     py_native_*_inout
  // ----------------------------------------
  // Argument:  int * argout +intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  static char PY_intargs__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_intargs(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.intargs
      int argin;
      int arginout;
      int argout;
      char *SHT_kwlist[] = {
          "argin",
          "arginout",
          NULL };
      PyObject *SHTPy_rv = NULL;  // return value object
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "ii:intargs",
          SHT_kwlist, &argin, &arginout))
          return NULL;
  
      intargs(argin, &arginout, &argout);
  
      // post_call
      SHTPy_rv = Py_BuildValue("ii", arginout, argout);
  
      return SHTPy_rv;
  // splicer end function.intargs
  }
  
  // ----------------------------------------
  // Function:  void cos_doubles
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  double * in +intent(in)+rank(1)
  // Attrs:     +intent(in)
  // Exact:     py_native_*_in_pointer_numpy
  // ----------------------------------------
  // Argument:  double * out +deref(allocatable)+dimension(size(in))+intent(out)
  // Attrs:     +deref(allocatable)+intent(out)
  // Exact:     py_native_*_out_allocatable_numpy
  // ----------------------------------------
  // Argument:  int sizein +implied(size(in))+value
  // Exact:     py_default
  static char PY_cos_doubles__doc__[] =
  "documentation"
  ;
  
  /**
   * \brief compute cos of IN and save in OUT
   *
   * allocate OUT same type as IN implied size of array
   */
  static PyObject *
  PY_cos_doubles(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.cos_doubles
      double * in;
      PyObject * SHTPy_in;
      PyArrayObject * SHPy_in = NULL;
      double * out;
      npy_intp SHD_out[1];
      PyArrayObject * SHPy_out = NULL;
      int sizein;
      char *SHT_kwlist[] = {
          "in",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:cos_doubles",
          SHT_kwlist, &SHTPy_in))
          return NULL;
  
      // post_parse
      SHPy_in = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_in, NPY_DOUBLE,
          NPY_ARRAY_IN_ARRAY);
      if (SHPy_in == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "in must be a 1-D array of double");
          goto fail;
      }
      SHD_out[0] = PyArray_SIZE(SHPy_in);
      SHPy_out = (PyArrayObject *) PyArray_SimpleNew(1, SHD_out, NPY_DOUBLE);
      if (SHPy_out == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "out must be a 1-D array of double");
          goto fail;
      }
  
      // pre_call
      in = PyArray_DATA(SHPy_in);
      out = PyArray_DATA(SHPy_out);
      sizein = PyArray_SIZE(SHPy_in);
  
      cos_doubles(in, out, sizein);
  
      // cleanup
      Py_DECREF(SHPy_in);
  
      return (PyObject *) SHPy_out;
  
  fail:
      Py_XDECREF(SHPy_in);
      Py_XDECREF(SHPy_out);
      return NULL;
  // splicer end function.cos_doubles
  }
  
  // ----------------------------------------
  // Function:  void truncate_to_int
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  double * in +intent(in)+rank(1)
  // Attrs:     +intent(in)
  // Exact:     py_native_*_in_pointer_numpy
  // ----------------------------------------
  // Argument:  int * out +deref(allocatable)+dimension(size(in))+intent(out)
  // Attrs:     +deref(allocatable)+intent(out)
  // Exact:     py_native_*_out_allocatable_numpy
  // ----------------------------------------
  // Argument:  int sizein +implied(size(in))+value
  // Exact:     py_default
  static char PY_truncate_to_int__doc__[] =
  "documentation"
  ;
  
  /**
   * \brief truncate IN argument and save in OUT
   *
   * allocate OUT different type as IN
   * implied size of array
   */
  static PyObject *
  PY_truncate_to_int(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.truncate_to_int
      double * in;
      PyObject * SHTPy_in;
      PyArrayObject * SHPy_in = NULL;
      int * out;
      npy_intp SHD_out[1];
      PyArrayObject * SHPy_out = NULL;
      int sizein;
      char *SHT_kwlist[] = {
          "in",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:truncate_to_int",
          SHT_kwlist, &SHTPy_in))
          return NULL;
  
      // post_parse
      SHPy_in = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_in, NPY_DOUBLE,
          NPY_ARRAY_IN_ARRAY);
      if (SHPy_in == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "in must be a 1-D array of double");
          goto fail;
      }
      SHD_out[0] = PyArray_SIZE(SHPy_in);
      SHPy_out = (PyArrayObject *) PyArray_SimpleNew(1, SHD_out, NPY_INT);
      if (SHPy_out == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "out must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      in = PyArray_DATA(SHPy_in);
      out = PyArray_DATA(SHPy_out);
      sizein = PyArray_SIZE(SHPy_in);
  
      truncate_to_int(in, out, sizein);
  
      // cleanup
      Py_DECREF(SHPy_in);
  
      return (PyObject *) SHPy_out;
  
  fail:
      Py_XDECREF(SHPy_in);
      Py_XDECREF(SHPy_out);
      return NULL;
  // splicer end function.truncate_to_int
  }
  
  // ----------------------------------------
  // Function:  void get_values
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * nvalues +intent(OUT)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  // ----------------------------------------
  // Argument:  int * values +dimension(3)+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out_pointer_numpy
  static char PY_get_values__doc__[] =
  "documentation"
  ;
  
  /**
   * \brief fill values into array
   *
   * The function knows how long the array must be.
   * Fortran will treat the dimension as assumed-length.
   * The Python wrapper will create a NumPy array or list so it must
   * have an explicit dimension (not assumed-length).
   */
  static PyObject *
  PY_get_values(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_values
      int nvalues;
      int * values;
      npy_intp SHD_values[1];
      PyArrayObject * SHPy_values = NULL;
      PyObject *SHTPy_rv = NULL;  // return value object
  
      // post_parse
      SHD_values[0] = 3;
      SHPy_values = (PyArrayObject *) PyArray_SimpleNew(1, SHD_values, NPY_INT);
      if (SHPy_values == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "values must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      values = PyArray_DATA(SHPy_values);
  
      get_values(&nvalues, values);
  
      // post_call
      SHTPy_rv = Py_BuildValue("iO", nvalues, SHPy_values);
  
      return SHTPy_rv;
  
  fail:
      Py_XDECREF(SHPy_values);
      return NULL;
  // splicer end function.get_values
  }
  
  // ----------------------------------------
  // Function:  void get_values2
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * arg1 +dimension(3)+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out_pointer_numpy
  // ----------------------------------------
  // Argument:  int * arg2 +dimension(3)+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out_pointer_numpy
  static char PY_get_values2__doc__[] =
  "documentation"
  ;
  
  /**
   * \brief fill values into two arrays
   *
   * Test two intent(out) arguments.
   * Make sure error handling works with C++.
   */
  static PyObject *
  PY_get_values2(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_values2
      int * arg1;
      npy_intp SHD_arg1[1];
      PyArrayObject * SHPy_arg1 = NULL;
      int * arg2;
      npy_intp SHD_arg2[1];
      PyArrayObject * SHPy_arg2 = NULL;
      PyObject *SHTPy_rv = NULL;  // return value object
  
      // post_parse
      SHD_arg1[0] = 3;
      SHPy_arg1 = (PyArrayObject *) PyArray_SimpleNew(1, SHD_arg1, NPY_INT);
      if (SHPy_arg1 == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "arg1 must be a 1-D array of int");
          goto fail;
      }
      SHD_arg2[0] = 3;
      SHPy_arg2 = (PyArrayObject *) PyArray_SimpleNew(1, SHD_arg2, NPY_INT);
      if (SHPy_arg2 == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "arg2 must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      arg1 = PyArray_DATA(SHPy_arg1);
      arg2 = PyArray_DATA(SHPy_arg2);
  
      get_values2(arg1, arg2);
  
      // post_call
      SHTPy_rv = Py_BuildValue("OO", SHPy_arg1, SHPy_arg2);
  
      return SHTPy_rv;
  
  fail:
      Py_XDECREF(SHPy_arg1);
      Py_XDECREF(SHPy_arg2);
      return NULL;
  // splicer end function.get_values2
  }
  
  // ----------------------------------------
  // Function:  void iota_allocatable
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int nvar +value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  // ----------------------------------------
  // Argument:  int * values +deref(allocatable)+dimension(nvar)+intent(out)
  // Attrs:     +deref(allocatable)+intent(out)
  // Exact:     py_native_*_out_allocatable_numpy
  static char PY_iota_allocatable__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_iota_allocatable(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.iota_allocatable
      int nvar;
      int * values;
      npy_intp SHD_values[1];
      PyArrayObject * SHPy_values = NULL;
      char *SHT_kwlist[] = {
          "nvar",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:iota_allocatable",
          SHT_kwlist, &nvar))
          return NULL;
  
      // post_parse
      SHD_values[0] = nvar;
      SHPy_values = (PyArrayObject *) PyArray_SimpleNew(1, SHD_values, NPY_INT);
      if (SHPy_values == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "values must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      values = PyArray_DATA(SHPy_values);
  
      iota_allocatable(nvar, values);
      return (PyObject *) SHPy_values;
  
  fail:
      Py_XDECREF(SHPy_values);
      return NULL;
  // splicer end function.iota_allocatable
  }
  
  // ----------------------------------------
  // Function:  void iota_dimension
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int nvar +value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  // ----------------------------------------
  // Argument:  int * values +dimension(nvar)+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out_pointer_numpy
  static char PY_iota_dimension__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_iota_dimension(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.iota_dimension
      int nvar;
      int * values;
      npy_intp SHD_values[1];
      PyArrayObject * SHPy_values = NULL;
      char *SHT_kwlist[] = {
          "nvar",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:iota_dimension",
          SHT_kwlist, &nvar))
          return NULL;
  
      // post_parse
      SHD_values[0] = nvar;
      SHPy_values = (PyArrayObject *) PyArray_SimpleNew(1, SHD_values, NPY_INT);
      if (SHPy_values == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "values must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      values = PyArray_DATA(SHPy_values);
  
      iota_dimension(nvar, values);
      return (PyObject *) SHPy_values;
  
  fail:
      Py_XDECREF(SHPy_values);
      return NULL;
  // splicer end function.iota_dimension
  }
  
  // ----------------------------------------
  // Function:  void Sum
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int len +implied(size(values))+value
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  const int * values +rank(1)
  // Attrs:     +intent(in)
  // Exact:     py_native_*_in_pointer_numpy
  // ----------------------------------------
  // Argument:  int * result +intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  static char PY_Sum__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_Sum(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.sum
      int len;
      int * values;
      PyObject * SHTPy_values;
      PyArrayObject * SHPy_values = NULL;
      int result;
      char *SHT_kwlist[] = {
          "values",
          NULL };
      PyObject * SHPy_result = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:Sum", SHT_kwlist, 
          &SHTPy_values))
          return NULL;
  
      // post_parse
      SHPy_values = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_values,
          NPY_INT, NPY_ARRAY_IN_ARRAY);
      if (SHPy_values == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "values must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      values = PyArray_DATA(SHPy_values);
      len = PyArray_SIZE(SHPy_values);
  
      Sum(len, values, &result);
  
      // post_call
      SHPy_result = PyInt_FromLong(result);
  
      // cleanup
      Py_DECREF(SHPy_values);
  
      return (PyObject *) SHPy_result;
  
  fail:
      Py_XDECREF(SHPy_values);
      return NULL;
  // splicer end function.sum
  }
  
  // ----------------------------------------
  // Function:  void fillIntArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * out +dimension(3)+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out_pointer_numpy
  static char PY_fillIntArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Return three values into memory the user provides.
   */
  static PyObject *
  PY_fillIntArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.fill_int_array
      int * out;
      npy_intp SHD_out[1];
      PyArrayObject * SHPy_out = NULL;
  
      // post_parse
      SHD_out[0] = 3;
      SHPy_out = (PyArrayObject *) PyArray_SimpleNew(1, SHD_out, NPY_INT);
      if (SHPy_out == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "out must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      out = PyArray_DATA(SHPy_out);
  
      fillIntArray(out);
      return (PyObject *) SHPy_out;
  
  fail:
      Py_XDECREF(SHPy_out);
      return NULL;
  // splicer end function.fill_int_array
  }
  
  // ----------------------------------------
  // Function:  void incrementIntArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * array +intent(inout)+rank(1)
  // Attrs:     +intent(inout)
  // Exact:     py_native_*_inout_pointer_numpy
  // ----------------------------------------
  // Argument:  int sizein +implied(size(array))+value
  // Exact:     py_default
  static char PY_incrementIntArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Increment array in place using intent(INOUT).
   */
  static PyObject *
  PY_incrementIntArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.increment_int_array
      int * array;
      PyObject * SHTPy_array;
      PyArrayObject * SHPy_array = NULL;
      int sizein;
      char *SHT_kwlist[] = {
          "array",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:incrementIntArray",
          SHT_kwlist, &SHTPy_array))
          return NULL;
  
      // post_parse
      SHPy_array = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_array,
          NPY_INT, NPY_ARRAY_INOUT_ARRAY);
      if (SHPy_array == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "array must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      array = PyArray_DATA(SHPy_array);
      sizein = PyArray_SIZE(SHPy_array);
  
      incrementIntArray(array, sizein);
      return (PyObject *) SHPy_array;
  
  fail:
      Py_XDECREF(SHPy_array);
      return NULL;
  // splicer end function.increment_int_array
  }
  
  // ----------------------------------------
  // Function:  void fill_with_zeros
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  double * x +rank(1)
  // Attrs:     +intent(inout)
  // Exact:     py_native_*_inout_pointer_numpy
  // ----------------------------------------
  // Argument:  int x_length +implied(size(x))+value
  // Exact:     py_default
  static char PY_fill_with_zeros__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_fill_with_zeros(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.fill_with_zeros
      double * x;
      PyObject * SHTPy_x;
      PyArrayObject * SHPy_x = NULL;
      int x_length;
      char *SHT_kwlist[] = {
          "x",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:fill_with_zeros",
          SHT_kwlist, &SHTPy_x))
          return NULL;
  
      // post_parse
      SHPy_x = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_x, NPY_DOUBLE,
          NPY_ARRAY_INOUT_ARRAY);
      if (SHPy_x == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "x must be a 1-D array of double");
          goto fail;
      }
  
      // pre_call
      x = PyArray_DATA(SHPy_x);
      x_length = PyArray_SIZE(SHPy_x);
  
      fill_with_zeros(x, x_length);
      return (PyObject *) SHPy_x;
  
  fail:
      Py_XDECREF(SHPy_x);
      return NULL;
  // splicer end function.fill_with_zeros
  }
  
  // ----------------------------------------
  // Function:  int accumulate
  // Attrs:     +intent(result)
  // Requested: py_native_scalar_result
  // Match:     py_default
  // ----------------------------------------
  // Argument:  const int * arr +rank(1)
  // Attrs:     +intent(in)
  // Exact:     py_native_*_in_pointer_numpy
  // ----------------------------------------
  // Argument:  size_t len +implied(size(arr))+value
  // Exact:     py_default
  static char PY_accumulate__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_accumulate(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.accumulate
      int * arr;
      PyObject * SHTPy_arr;
      PyArrayObject * SHPy_arr = NULL;
      size_t len;
      char *SHT_kwlist[] = {
          "arr",
          NULL };
      int SHCXX_rv;
      PyObject * SHTPy_rv = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:accumulate",
          SHT_kwlist, &SHTPy_arr))
          return NULL;
  
      // post_parse
      SHPy_arr = (PyArrayObject *) PyArray_FROM_OTF(SHTPy_arr, NPY_INT,
          NPY_ARRAY_IN_ARRAY);
      if (SHPy_arr == NULL) {
          PyErr_SetString(PyExc_ValueError,
              "arr must be a 1-D array of int");
          goto fail;
      }
  
      // pre_call
      arr = PyArray_DATA(SHPy_arr);
      len = PyArray_SIZE(SHPy_arr);
  
      SHCXX_rv = accumulate(arr, len);
  
      // post_call
      SHTPy_rv = PyInt_FromLong(SHCXX_rv);
  
      // cleanup
      Py_DECREF(SHPy_arr);
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHPy_arr);
      return NULL;
  // splicer end function.accumulate
  }
  
  // ----------------------------------------
  // Function:  int acceptCharArrayIn
  // Attrs:     +intent(result)
  // Requested: py_native_scalar_result
  // Match:     py_default
  // ----------------------------------------
  // Argument:  char * * names +intent(in)+rank(1)
  // Attrs:     +intent(in)
  // Exact:     py_char_**_in
  static char PY_acceptCharArrayIn__doc__[] =
  "documentation"
  ;
  
  /**
   * Return strlen of the first index as a check.
   */
  static PyObject *
  PY_acceptCharArrayIn(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.accept_char_array_in
      char ** names = NULL;
      PyObject * SHTPy_names;
      POI_SHROUD_converter_value SHValue_names = {NULL, NULL, NULL, NULL, 0};
      SHValue_names.name = "names";
      Py_ssize_t SHSize_names;
      char *SHT_kwlist[] = {
          "names",
          NULL };
      int SHCXX_rv;
      PyObject * SHTPy_rv = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "O:acceptCharArrayIn",
          SHT_kwlist, &SHTPy_names))
          return NULL;
  
      // pre_call
      if (SHROUD_get_from_object_charptr
          (SHTPy_names, &SHValue_names) == 0)
          goto fail;
      names = (char **) SHValue_names.data;
  
      SHCXX_rv = acceptCharArrayIn(names);
  
      // post_call
      Py_XDECREF(SHValue_names.dataobj);
      SHTPy_rv = PyInt_FromLong(SHCXX_rv);
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHValue_names.dataobj);
      return NULL;
  // splicer end function.accept_char_array_in
  }
  
  // ----------------------------------------
  // Function:  void setGlobalInt
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int value +value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  static char PY_setGlobalInt__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_setGlobalInt(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.set_global_int
      int value;
      char *SHT_kwlist[] = {
          "value",
          NULL };
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:setGlobalInt",
          SHT_kwlist, &value))
          return NULL;
  
      setGlobalInt(value);
      Py_RETURN_NONE;
  // splicer end function.set_global_int
  }
  
  // ----------------------------------------
  // Function:  int sumFixedArray
  // Attrs:     +intent(result)
  // Requested: py_native_scalar_result
  // Match:     py_default
  static char PY_sumFixedArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Used to test values global_array.
   */
  static PyObject *
  PY_sumFixedArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.sum_fixed_array
      PyObject * SHTPy_rv = NULL;
  
      int SHCXX_rv = sumFixedArray();
  
      // post_call
      SHTPy_rv = PyInt_FromLong(SHCXX_rv);
  
      return (PyObject *) SHTPy_rv;
  // splicer end function.sum_fixed_array
  }
  
  // ----------------------------------------
  // Function:  void getPtrToFixedArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * * count +deref(pointer)+dimension(10)+intent(out)
  // Attrs:     +deref(pointer)+intent(out)
  // Exact:     py_native_**_out_pointer_numpy
  static char PY_getPtrToFixedArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Return a Fortran pointer to an array which is always the same length.
   */
  static PyObject *
  PY_getPtrToFixedArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_ptr_to_fixed_array
      int *count;
      npy_intp SHD_count[1];
      PyObject *SHPy_count = NULL;
  
      getPtrToFixedArray(&count);
  
      // post_call
      SHD_count[0] = 10;
      SHPy_count = PyArray_SimpleNewFromData(1, SHD_count, NPY_INT,
          count);
      if (SHPy_count == NULL) goto fail;
  
      return (PyObject *) SHPy_count;
  
  fail:
      Py_XDECREF(SHPy_count);
      return NULL;
  // splicer end function.get_ptr_to_fixed_array
  }
  
  // ----------------------------------------
  // Function:  void getPtrToDynamicArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * * count +deref(pointer)+dimension(ncount)+intent(out)
  // Attrs:     +deref(pointer)+intent(out)
  // Exact:     py_native_**_out_pointer_numpy
  // ----------------------------------------
  // Argument:  int * ncount +hidden+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  static char PY_getPtrToDynamicArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Return a Fortran pointer to an array which is the length of
   * the argument ncount.
   */
  static PyObject *
  PY_getPtrToDynamicArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_ptr_to_dynamic_array
      int *count;
      npy_intp SHD_count[1];
      PyObject *SHPy_count = NULL;
      int ncount;
  
      getPtrToDynamicArray(&count, &ncount);
  
      // post_call
      SHD_count[0] = ncount;
      SHPy_count = PyArray_SimpleNewFromData(1, SHD_count, NPY_INT,
          count);
      if (SHPy_count == NULL) goto fail;
  
      return (PyObject *) SHPy_count;
  
  fail:
      Py_XDECREF(SHPy_count);
      return NULL;
  // splicer end function.get_ptr_to_dynamic_array
  }
  
  // ----------------------------------------
  // Function:  void getPtrToFuncArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * * count +deref(pointer)+dimension(getLen())+intent(out)
  // Attrs:     +deref(pointer)+intent(out)
  // Exact:     py_native_**_out_pointer_numpy
  static char PY_getPtrToFuncArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Return a Fortran pointer to an array which is the length
   * is computed by C++ function getLen.
   * getLen will be called from C/C++ to compute the shape.
   */
  static PyObject *
  PY_getPtrToFuncArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_ptr_to_func_array
      int *count;
      npy_intp SHD_count[1];
      PyObject *SHPy_count = NULL;
  
      getPtrToFuncArray(&count);
  
      // post_call
      SHD_count[0] = getLen();
      SHPy_count = PyArray_SimpleNewFromData(1, SHD_count, NPY_INT,
          count);
      if (SHPy_count == NULL) goto fail;
  
      return (PyObject *) SHPy_count;
  
  fail:
      Py_XDECREF(SHPy_count);
      return NULL;
  // splicer end function.get_ptr_to_func_array
  }
  
  // ----------------------------------------
  // Function:  void getPtrToFixedConstArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  const int * * count +deref(pointer)+dimension(10)+intent(out)
  // Attrs:     +deref(pointer)+intent(out)
  // Exact:     py_native_**_out_pointer_numpy
  static char PY_getPtrToFixedConstArray__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_getPtrToFixedConstArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_ptr_to_fixed_const_array
      const int *count;
      npy_intp SHD_count[1];
      PyObject *SHPy_count = NULL;
  
      getPtrToFixedConstArray(&count);
  
      // post_call
      SHD_count[0] = 10;
      SHPy_count = PyArray_SimpleNewFromData(1, SHD_count, NPY_INT,
          (int *) count);
      if (SHPy_count == NULL) goto fail;
  
      return (PyObject *) SHPy_count;
  
  fail:
      Py_XDECREF(SHPy_count);
      return NULL;
  // splicer end function.get_ptr_to_fixed_const_array
  }
  
  // ----------------------------------------
  // Function:  void getPtrToDynamicConstArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  const int * * count +deref(pointer)+dimension(ncount)+intent(out)
  // Attrs:     +deref(pointer)+intent(out)
  // Exact:     py_native_**_out_pointer_numpy
  // ----------------------------------------
  // Argument:  int * ncount +hidden+intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_native_*_out
  static char PY_getPtrToDynamicConstArray__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_getPtrToDynamicConstArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_ptr_to_dynamic_const_array
      const int *count;
      npy_intp SHD_count[1];
      PyObject *SHPy_count = NULL;
      int ncount;
  
      getPtrToDynamicConstArray(&count, &ncount);
  
      // post_call
      SHD_count[0] = ncount;
      SHPy_count = PyArray_SimpleNewFromData(1, SHD_count, NPY_INT,
          (int *) count);
      if (SHPy_count == NULL) goto fail;
  
      return (PyObject *) SHPy_count;
  
  fail:
      Py_XDECREF(SHPy_count);
      return NULL;
  // splicer end function.get_ptr_to_dynamic_const_array
  }
  
  // ----------------------------------------
  // Function:  void getRawPtrToScalar
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * * nitems +deref(raw)+intent(out)
  // Attrs:     +deref(raw)+intent(out)
  // Exact:     py_native_**_out_raw
  static char PY_getRawPtrToScalar__doc__[] =
  "documentation"
  ;
  
  /**
   * Called directly via an interface in Fortran.
   */
  static PyObject *
  PY_getRawPtrToScalar(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_raw_ptr_to_scalar
      int *nitems;
      PyObject *SHPy_nitems = NULL;
  
      getRawPtrToScalar(&nitems);
  
      // post_call
      SHPy_nitems = PyCapsule_New(nitems, NULL, NULL);
  
      return (PyObject *) SHPy_nitems;
  // splicer end function.get_raw_ptr_to_scalar
  }
  
  // ----------------------------------------
  // Function:  void getRawPtrToFixedArray
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  int * * count +deref(raw)+intent(out)
  // Attrs:     +deref(raw)+intent(out)
  // Exact:     py_native_**_out_raw
  static char PY_getRawPtrToFixedArray__doc__[] =
  "documentation"
  ;
  
  /**
   * Return a type(C_PTR) to an array which is always the same length.
   * Called directly via an interface in Fortran.
   * # Uses +deref(raw) instead of +dimension(10) like getPtrToFixedArray.
   */
  static PyObject *
  PY_getRawPtrToFixedArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.get_raw_ptr_to_fixed_array
      int *count;
      PyObject *SHPy_count = NULL;
  
      getRawPtrToFixedArray(&count);
  
      // post_call
      SHPy_count = PyCapsule_New(count, NULL, NULL);
  
      return (PyObject *) SHPy_count;
  // splicer end function.get_raw_ptr_to_fixed_array
  }
  
  // ----------------------------------------
  // Function:  void * returnAddress1
  // Attrs:     +intent(result)
  // Exact:     py_void_*_result
  // ----------------------------------------
  // Argument:  int flag +value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  static char PY_returnAddress1__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnAddress1(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.return_address1
      int flag;
      char *SHT_kwlist[] = {
          "flag",
          NULL };
      PyObject * SHTPy_rv = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:returnAddress1",
          SHT_kwlist, &flag))
          return NULL;
  
      void * SHCXX_rv = returnAddress1(flag);
  
      // post_call
      SHTPy_rv = PyCapsule_New(SHCXX_rv, NULL, NULL);
  
      return (PyObject *) SHTPy_rv;
  // splicer end function.return_address1
  }
  
  // ----------------------------------------
  // Function:  void * returnAddress2
  // Attrs:     +intent(result)
  // Exact:     py_void_*_result
  // ----------------------------------------
  // Argument:  int flag +value
  // Attrs:     +intent(in)
  // Requested: py_native_scalar_in
  // Match:     py_default
  static char PY_returnAddress2__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnAddress2(
    PyObject *SHROUD_UNUSED(self),
    PyObject *args,
    PyObject *kwds)
  {
  // splicer begin function.return_address2
      int flag;
      char *SHT_kwlist[] = {
          "flag",
          NULL };
      PyObject * SHTPy_rv = NULL;
  
      if (!PyArg_ParseTupleAndKeywords(args, kwds, "i:returnAddress2",
          SHT_kwlist, &flag))
          return NULL;
  
      void * SHCXX_rv = returnAddress2(flag);
  
      // post_call
      SHTPy_rv = PyCapsule_New(SHCXX_rv, NULL, NULL);
  
      return (PyObject *) SHTPy_rv;
  // splicer end function.return_address2
  }
  
  // ----------------------------------------
  // Function:  void fetchVoidPtr
  // Exact:     py_default
  // ----------------------------------------
  // Argument:  void * * addr +intent(out)
  // Attrs:     +intent(out)
  // Exact:     py_void_**_out
  static char PY_fetchVoidPtr__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_fetchVoidPtr(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.fetch_void_ptr
      void *addr;
      PyObject * SHPy_addr = NULL;
  
      fetchVoidPtr(&addr);
  
      // post_call
      SHPy_addr = PyCapsule_New(addr, NULL, NULL);
  
      return (PyObject *) SHPy_addr;
  // splicer end function.fetch_void_ptr
  }
  
  // ----------------------------------------
  // Function:  int * returnIntPtrToScalar +deref(pointer)
  // Attrs:     +deref(pointer)+intent(result)
  // Exact:     py_native_*_result_pointer_numpy
  static char PY_returnIntPtrToScalar__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnIntPtrToScalar(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.return_int_ptr_to_scalar
      PyObject * SHTPy_rv = NULL;
  
      int * SHCXX_rv = returnIntPtrToScalar();
  
      // post_call
      SHTPy_rv = PyArray_SimpleNewFromData(0, NULL, NPY_INT, SHCXX_rv);
      if (SHTPy_rv == NULL) goto fail;
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHTPy_rv);
      return NULL;
  // splicer end function.return_int_ptr_to_scalar
  }
  
  // ----------------------------------------
  // Function:  int * returnIntPtrToFixedArray +deref(pointer)+dimension(10)
  // Attrs:     +deref(pointer)+intent(result)
  // Exact:     py_native_*_result_pointer_numpy
  static char PY_returnIntPtrToFixedArray__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnIntPtrToFixedArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.return_int_ptr_to_fixed_array
      npy_intp SHD_rv[1];
      PyObject * SHTPy_rv = NULL;
  
      int * SHCXX_rv = returnIntPtrToFixedArray();
  
      // post_call
      SHD_rv[0] = 10;
      SHTPy_rv = PyArray_SimpleNewFromData(1, SHD_rv, NPY_INT, SHCXX_rv);
      if (SHTPy_rv == NULL) goto fail;
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHTPy_rv);
      return NULL;
  // splicer end function.return_int_ptr_to_fixed_array
  }
  
  // ----------------------------------------
  // Function:  const int * returnIntPtrToConstScalar +deref(pointer)
  // Attrs:     +deref(pointer)+intent(result)
  // Exact:     py_native_*_result_pointer_numpy
  static char PY_returnIntPtrToConstScalar__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnIntPtrToConstScalar(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.return_int_ptr_to_const_scalar
      PyObject * SHTPy_rv = NULL;
  
      const int * SHCXX_rv = returnIntPtrToConstScalar();
  
      // post_call
      SHTPy_rv = PyArray_SimpleNewFromData(0, NULL, NPY_INT,
          (int *) SHCXX_rv);
      if (SHTPy_rv == NULL) goto fail;
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHTPy_rv);
      return NULL;
  // splicer end function.return_int_ptr_to_const_scalar
  }
  
  // ----------------------------------------
  // Function:  const int * returnIntPtrToFixedConstArray +deref(pointer)+dimension(10)
  // Attrs:     +deref(pointer)+intent(result)
  // Exact:     py_native_*_result_pointer_numpy
  static char PY_returnIntPtrToFixedConstArray__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnIntPtrToFixedConstArray(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.return_int_ptr_to_fixed_const_array
      npy_intp SHD_rv[1];
      PyObject * SHTPy_rv = NULL;
  
      const int * SHCXX_rv = returnIntPtrToFixedConstArray();
  
      // post_call
      SHD_rv[0] = 10;
      SHTPy_rv = PyArray_SimpleNewFromData(1, SHD_rv, NPY_INT,
          (int *) SHCXX_rv);
      if (SHTPy_rv == NULL) goto fail;
  
      return (PyObject *) SHTPy_rv;
  
  fail:
      Py_XDECREF(SHTPy_rv);
      return NULL;
  // splicer end function.return_int_ptr_to_fixed_const_array
  }
  
  // ----------------------------------------
  // Function:  int * returnIntScalar +deref(scalar)
  // Attrs:     +deref(scalar)+intent(result)
  // Requested: py_native_*_result_scalar
  // Match:     py_default
  static char PY_returnIntScalar__doc__[] =
  "documentation"
  ;
  
  static PyObject *
  PY_returnIntScalar(
    PyObject *SHROUD_UNUSED(self),
    PyObject *SHROUD_UNUSED(args),
    PyObject *SHROUD_UNUSED(kwds))
  {
  // splicer begin function.return_int_scalar
      PyObject * SHTPy_rv = NULL;
  
      int * SHCXX_rv = returnIntScalar();
  
      // post_call
      SHTPy_rv = PyInt_FromLong(*SHCXX_rv);
  
      return (PyObject *) SHTPy_rv;
  // splicer end function.return_int_scalar
  }
  static PyMethodDef PY_methods[] = {
  {"intargs_in", (PyCFunction)PY_intargs_in, METH_VARARGS|METH_KEYWORDS,
      PY_intargs_in__doc__},
  {"intargs_inout", (PyCFunction)PY_intargs_inout,
      METH_VARARGS|METH_KEYWORDS, PY_intargs_inout__doc__},
  {"intargs_out", (PyCFunction)PY_intargs_out, METH_NOARGS,
      PY_intargs_out__doc__},
  {"intargs", (PyCFunction)PY_intargs, METH_VARARGS|METH_KEYWORDS,
      PY_intargs__doc__},
  {"cos_doubles", (PyCFunction)PY_cos_doubles, METH_VARARGS|METH_KEYWORDS,
      PY_cos_doubles__doc__},
  {"truncate_to_int", (PyCFunction)PY_truncate_to_int,
      METH_VARARGS|METH_KEYWORDS, PY_truncate_to_int__doc__},
  {"get_values", (PyCFunction)PY_get_values, METH_NOARGS,
      PY_get_values__doc__},
  {"get_values2", (PyCFunction)PY_get_values2, METH_NOARGS,
      PY_get_values2__doc__},
  {"iota_allocatable", (PyCFunction)PY_iota_allocatable,
      METH_VARARGS|METH_KEYWORDS, PY_iota_allocatable__doc__},
  {"iota_dimension", (PyCFunction)PY_iota_dimension,
      METH_VARARGS|METH_KEYWORDS, PY_iota_dimension__doc__},
  {"Sum", (PyCFunction)PY_Sum, METH_VARARGS|METH_KEYWORDS, PY_Sum__doc__},
  {"fillIntArray", (PyCFunction)PY_fillIntArray, METH_NOARGS,
      PY_fillIntArray__doc__},
  {"incrementIntArray", (PyCFunction)PY_incrementIntArray,
      METH_VARARGS|METH_KEYWORDS, PY_incrementIntArray__doc__},
  {"fill_with_zeros", (PyCFunction)PY_fill_with_zeros,
      METH_VARARGS|METH_KEYWORDS, PY_fill_with_zeros__doc__},
  {"accumulate", (PyCFunction)PY_accumulate, METH_VARARGS|METH_KEYWORDS,
      PY_accumulate__doc__},
  {"acceptCharArrayIn", (PyCFunction)PY_acceptCharArrayIn,
      METH_VARARGS|METH_KEYWORDS, PY_acceptCharArrayIn__doc__},
  {"setGlobalInt", (PyCFunction)PY_setGlobalInt,
      METH_VARARGS|METH_KEYWORDS, PY_setGlobalInt__doc__},
  {"sumFixedArray", (PyCFunction)PY_sumFixedArray, METH_NOARGS,
      PY_sumFixedArray__doc__},
  {"getPtrToFixedArray", (PyCFunction)PY_getPtrToFixedArray, METH_NOARGS,
      PY_getPtrToFixedArray__doc__},
  {"getPtrToDynamicArray", (PyCFunction)PY_getPtrToDynamicArray,
      METH_NOARGS, PY_getPtrToDynamicArray__doc__},
  {"getPtrToFuncArray", (PyCFunction)PY_getPtrToFuncArray, METH_NOARGS,
      PY_getPtrToFuncArray__doc__},
  {"getPtrToFixedConstArray", (PyCFunction)PY_getPtrToFixedConstArray,
      METH_NOARGS, PY_getPtrToFixedConstArray__doc__},
  {"getPtrToDynamicConstArray", (PyCFunction)PY_getPtrToDynamicConstArray,
      METH_NOARGS, PY_getPtrToDynamicConstArray__doc__},
  {"getRawPtrToScalar", (PyCFunction)PY_getRawPtrToScalar, METH_NOARGS,
      PY_getRawPtrToScalar__doc__},
  {"getRawPtrToFixedArray", (PyCFunction)PY_getRawPtrToFixedArray,
      METH_NOARGS, PY_getRawPtrToFixedArray__doc__},
  {"returnAddress1", (PyCFunction)PY_returnAddress1,
      METH_VARARGS|METH_KEYWORDS, PY_returnAddress1__doc__},
  {"returnAddress2", (PyCFunction)PY_returnAddress2,
      METH_VARARGS|METH_KEYWORDS, PY_returnAddress2__doc__},
  {"fetchVoidPtr", (PyCFunction)PY_fetchVoidPtr, METH_NOARGS,
      PY_fetchVoidPtr__doc__},
  {"returnIntPtrToScalar", (PyCFunction)PY_returnIntPtrToScalar,
      METH_NOARGS, PY_returnIntPtrToScalar__doc__},
  {"returnIntPtrToFixedArray", (PyCFunction)PY_returnIntPtrToFixedArray,
      METH_NOARGS, PY_returnIntPtrToFixedArray__doc__},
  {"returnIntPtrToConstScalar", (PyCFunction)PY_returnIntPtrToConstScalar,
      METH_NOARGS, PY_returnIntPtrToConstScalar__doc__},
  {"returnIntPtrToFixedConstArray",
      (PyCFunction)PY_returnIntPtrToFixedConstArray, METH_NOARGS,
      PY_returnIntPtrToFixedConstArray__doc__},
  {"returnIntScalar", (PyCFunction)PY_returnIntScalar, METH_NOARGS,
      PY_returnIntScalar__doc__},
  {NULL,   (PyCFunction)NULL, 0, NULL}            /* sentinel */
  };
  
  /*
   * initpointers - Initialization function for the module
   * *must* be called initpointers
   */
  static char PY__doc__[] =
  "library documentation"
  ;
  
  struct module_state {
      PyObject *error;
  };
  
  #if PY_MAJOR_VERSION >= 3
  #define GETSTATE(m) ((struct module_state*)PyModule_GetState(m))
  #else
  #define GETSTATE(m) (&_state)
  static struct module_state _state;
  #endif
  
  #if PY_MAJOR_VERSION >= 3
  static int pointers_traverse(PyObject *m, visitproc visit, void *arg) {
      Py_VISIT(GETSTATE(m)->error);
      return 0;
  }
  
  static int pointers_clear(PyObject *m) {
      Py_CLEAR(GETSTATE(m)->error);
      return 0;
  }
  
  static struct PyModuleDef moduledef = {
      PyModuleDef_HEAD_INIT,
      "pointers", /* m_name */
      PY__doc__, /* m_doc */
      sizeof(struct module_state), /* m_size */
      PY_methods, /* m_methods */
      NULL, /* m_reload */
      pointers_traverse, /* m_traverse */
      pointers_clear, /* m_clear */
      NULL  /* m_free */
  };
  
  #define RETVAL m
  #define INITERROR return NULL
  #else
  #define RETVAL
  #define INITERROR return
  #endif
  
  PyMODINIT_FUNC
  #if PY_MAJOR_VERSION >= 3
  PyInit_pointers(void)
  #else
  initpointers(void)
  #endif
  {
      PyObject *m = NULL;
      const char * error_name = "pointers.Error";
  
      // splicer begin C_init_locals
      // splicer end C_init_locals
  
  
      /* Create the module and add the functions */
  #if PY_MAJOR_VERSION >= 3
      m = PyModule_Create(&moduledef);
  #else
      m = Py_InitModule4("pointers", PY_methods,
          PY__doc__,
          (PyObject*)NULL,PYTHON_API_VERSION);
  #endif
      if (m == NULL)
          return RETVAL;
      struct module_state *st = GETSTATE(m);
  
      import_array();
  
      PY_error_obj = PyErr_NewException((char *) error_name, NULL, NULL);
      if (PY_error_obj == NULL)
          return RETVAL;
      st->error = PY_error_obj;
      PyModule_AddObject(m, "Error", st->error);
  
      // splicer begin C_init_body
      // splicer end C_init_body
  
      /* Check for errors */
      if (PyErr_Occurred())
          Py_FatalError("can't initialize module pointers");
      return RETVAL;
  }
  
  