""" Example of wrapping cos function from math.h using Cython. """

cdef extern from "test.c":
  int test_cfunc(int a)

def test_pyfunc(arg1):
  return test_cfunc(arg1)

cdef extern from "test.c":
  int test_cfunc_name(char* name, int a)

def test_name_pyfunc(arg1, arg2):
  return test_cfunc_name(arg1, arg2)

cdef extern from "test.c":
  void return_string_name(char* name, char* nameout)

def rsn_pyfunc(name):
  cdef char nameout[50]
  return_string_name(name, nameout)
  return nameout



