Replaced PASS_* constants with pass name lookup.

This commit is contained in:
Siu Kwan Lam 2012-07-23 17:39:40 -07:00
commit 2d79cfa437
6 changed files with 176 additions and 214 deletions

View file

@ -355,6 +355,21 @@ _w ## func (PyObject *self, PyObject *args) \
return ctor_ ## outtype ( func ()); \
}
/**
* Wrap LLVM functions of the type
* const char * func()
*/
#define _wrap_none2str(func) \
static PyObject * \
_w ## func (PyObject *self, PyObject *args) \
{ \
if (!PyArg_ParseTuple(args, "")) \
return NULL; \
return PyBytes_FromString(func()); \
}
/**
* Wrap LLVM functions of the type
* const char *func(intype1 arg1)
@ -1231,6 +1246,21 @@ _w ## func (PyObject *self, PyObject *args) \
return ctor_ ## outtype ( func ()); \
}
/**
* Wrap LLVM functions of the type
* const char * func()
*/
#define _wrap_none2str(func) \
static PyObject * \
_w ## func (PyObject *self, PyObject *args) \
{ \
if (!PyArg_ParseTuple(args, "")) \
return NULL; \
return PyBytes_FromString(func()); \
}
/**
* Wrap LLVM functions of the type
* const char *func(intype1 arg1)