Replaced PASS_* constants with pass name lookup.
This commit is contained in:
parent
6fb55db69d
commit
2d79cfa437
6 changed files with 176 additions and 214 deletions
30
llvm/wrap.h
30
llvm/wrap.h
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue