Source

opycaml / api_ml.h

#include "Python.h"
#include <caml/mlvalues.h>
#include <caml/memory.h>
#include <caml/callback.h>
#include <caml/custom.h>
#include <caml/alloc.h>
#include <caml/fail.h>
#include <unistd.h>

#define true 1
#define false 0

#define getcustom(v) (*((void **)Data_custom_val(v)))
#define PyObject_val(v) ((PyObject*)getcustom(v))
PyObject * PyObject_opt_val(value);
value Val_PyObject(PyObject*, int);
value Val_PyObject_exc_at_null(PyObject*);
value Val_PyObject_noincr_exc_at_null(PyObject*);
value Plus_or_fail(int);
value Hash_or_fail(long);