Пример #1
0
static PyObject *
_cffi_f_sum1(PyObject *self, PyObject *args)
{
    double * * x0;
    int x1;
    int x2;
    int x3;
    int x4;
    Py_ssize_t datasize;
    double result;
    PyObject *arg0;
    PyObject *arg1;
    PyObject *arg2;
    PyObject *arg3;
    PyObject *arg4;

    if (!PyArg_ParseTuple(args, "OOOOO:sum1", &arg0, &arg1, &arg2, &arg3, &arg4))
        return NULL;

    datasize = _cffi_prepare_pointer_call_argument(
                   _cffi_type(0), arg0, (char **)&x0);
    if (datasize != 0) {
        if (datasize < 0)
            return NULL;
        x0 = alloca((size_t)datasize);
        memset((void *)x0, 0, (size_t)datasize);
        if (_cffi_convert_array_from_object((char *)x0, _cffi_type(0), arg0) < 0)
            return NULL;
    }

    x1 = _cffi_to_c_int(arg1, int);
    if (x1 == (int)-1 && PyErr_Occurred())
        return NULL;

    x2 = _cffi_to_c_int(arg2, int);
    if (x2 == (int)-1 && PyErr_Occurred())
        return NULL;

    x3 = _cffi_to_c_int(arg3, int);
    if (x3 == (int)-1 && PyErr_Occurred())
        return NULL;

    x4 = _cffi_to_c_int(arg4, int);
    if (x4 == (int)-1 && PyErr_Occurred())
        return NULL;

    Py_BEGIN_ALLOW_THREADS
    _cffi_restore_errno();
    {
        result = sum1(x0, x1, x2, x3, x4);
    }
    _cffi_save_errno();
    Py_END_ALLOW_THREADS

    (void)self; /* unused */
    return _cffi_from_c_double(result);
}
static PyObject *
_cffi_f_test1iarm(PyObject *self, PyObject *arg0)
{
  double x0;
  double result;

  x0 = _cffi_to_c_double(arg0);
  if (x0 == (double)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = test1iarm(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  return _cffi_from_c_double(result);
}
Пример #3
0
static PyObject *
_cffi_f_ceil(PyObject *self, PyObject *arg0)
{
  double x0;
  double result;

  x0 = (double)_cffi_to_c_double(arg0);
  if (x0 == (double)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = ceil(x0); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_double(result);
}
Пример #4
0
static PyObject *
_cffi_f_form_volume(PyObject *self, PyObject *args)
{
  double x0;
  double x1;
  double x2;
  double result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject **aa;

  aa = _cffi_unpack_args(args, 3, "form_volume");
  if (aa == NULL)
    return NULL;
  arg0 = aa[0];
  arg1 = aa[1];
  arg2 = aa[2];

  x0 = (double)_cffi_to_c_double(arg0);
  if (x0 == (double)-1 && PyErr_Occurred())
    return NULL;

  x1 = (double)_cffi_to_c_double(arg1);
  if (x1 == (double)-1 && PyErr_Occurred())
    return NULL;

  x2 = (double)_cffi_to_c_double(arg2);
  if (x2 == (double)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = form_volume(x0, x1, x2); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_double(result);
}
Пример #5
0
static PyObject *
_cffi_f_Iq(PyObject *self, PyObject *args)
{
  double x0;
  double x1;
  double x2;
  double x3;
  double x4;
  double x5;
  double result;
  PyObject *arg0;
  PyObject *arg1;
  PyObject *arg2;
  PyObject *arg3;
  PyObject *arg4;
  PyObject *arg5;
  PyObject **aa;

  aa = _cffi_unpack_args(args, 6, "Iq");
  if (aa == NULL)
    return NULL;
  arg0 = aa[0];
  arg1 = aa[1];
  arg2 = aa[2];
  arg3 = aa[3];
  arg4 = aa[4];
  arg5 = aa[5];

  x0 = (double)_cffi_to_c_double(arg0);
  if (x0 == (double)-1 && PyErr_Occurred())
    return NULL;

  x1 = (double)_cffi_to_c_double(arg1);
  if (x1 == (double)-1 && PyErr_Occurred())
    return NULL;

  x2 = (double)_cffi_to_c_double(arg2);
  if (x2 == (double)-1 && PyErr_Occurred())
    return NULL;

  x3 = (double)_cffi_to_c_double(arg3);
  if (x3 == (double)-1 && PyErr_Occurred())
    return NULL;

  x4 = (double)_cffi_to_c_double(arg4);
  if (x4 == (double)-1 && PyErr_Occurred())
    return NULL;

  x5 = (double)_cffi_to_c_double(arg5);
  if (x5 == (double)-1 && PyErr_Occurred())
    return NULL;

  Py_BEGIN_ALLOW_THREADS
  _cffi_restore_errno();
  { result = Iq(x0, x1, x2, x3, x4, x5); }
  _cffi_save_errno();
  Py_END_ALLOW_THREADS

  (void)self; /* unused */
  return _cffi_from_c_double(result);
}