Source

opycaml / classes.h.in

typedef PyObject * Py##name##_p;
typedef PyObject * Py##name##_p_noincr;
typedef PyObject * Py##name##_p_incr;
typedef PyObject * Py##name##_p_option;
#define Py##name##_ml2c(value,c) (*c = PyObject_val(value))
#define Py##name##_c2ml(c) (Val_PyObject_exc_at_null(*c))
#define Py##name##_noincr_c2ml(c) (Val_PyObject_noincr_exc_at_null(*c))
#define Py##name##_incr_ml2c(value,c) (*c = PyObject_val(value), Py_INCREF(*c))
#define Py##name##_option_ml2c(value,c) (*c = PyObject_opt_val(value))
#define Py##name##_option_c2ml(c) (Val_PyObject_opt(*c, 0))