Merge pull request #24 from dand-oss/master

Change static string in header file to extern
This commit is contained in:
Siu Kwan Lam 2012-09-21 19:42:22 -07:00
commit 9a51ead50e
2 changed files with 59 additions and 55 deletions

View file

@ -30,6 +30,8 @@
#include "wrap.h" #include "wrap.h"
const char PYCAP_OBJECT_NAME[] = "llvm.wrap.h";
/*===----------------------------------------------------------------------===*/ /*===----------------------------------------------------------------------===*/
/* Type ctor/dtor */ /* Type ctor/dtor */
/*===----------------------------------------------------------------------===*/ /*===----------------------------------------------------------------------===*/

View file

@ -91,7 +91,7 @@ typedef long long llvmwrap_ll;
/* Type ctor/dtor */ /* Type ctor/dtor */
/*===----------------------------------------------------------------------===*/ /*===----------------------------------------------------------------------===*/
static const char PYCAP_OBJECT_NAME[] = "llvm.wrap.h"; extern const char PYCAP_OBJECT_NAME[] ;
// Cast python object to aTYPE // Cast python object to aTYPE
template <typename aTYPE> template <typename aTYPE>
@ -180,7 +180,6 @@ PyObject* make_list( aTYPE p[], size_t n )
****************************************************************************** ******************************************************************************
*****************************************************************************/ *****************************************************************************/
#define _wrap_none2none(func) \ #define _wrap_none2none(func) \
static PyObject * \ static PyObject * \
_w ## func(PyObject * self, PyObject * args) \ _w ## func(PyObject * self, PyObject * args) \
@ -977,7 +976,8 @@ _w ## func (PyObject *self, PyObject *args) \
* Wrap LLVM functions of the type * Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3 arg3, intype arg4) * outtype func(intype1 arg1, intype2 arg2, intype3 arg3, intype arg4)
*/ */
#define _wrap_objobjobjobj2obj(func, intype1, intype2, intype3, intype4, outtype) \ #define _wrap_objobjobjobj2obj(func, intype1, intype2, intype3, \
intype4, outtype) \
static PyObject * \ static PyObject * \
_w ## func (PyObject *self, PyObject *args) \ _w ## func (PyObject *self, PyObject *args) \
{ \ { \
@ -999,7 +999,8 @@ _w ## func (PyObject *self, PyObject *args)
* Wrap LLVM functions of the type * Wrap LLVM functions of the type
* outtype func(intype1 arg1, intype2 arg2, intype3 arg3, intype arg4, const char *arg5) * outtype func(intype1 arg1, intype2 arg2, intype3 arg3, intype arg4, const char *arg5)
*/ */
#define _wrap_objobjobjobjstr2obj(func, intype1, intype2, intype3, intype4, outtype)\ #define _wrap_objobjobjobjstr2obj(func, intype1, intype2, intype3, \
intype4, outtype)\
static PyObject * \ static PyObject * \
_w ## func (PyObject *self, PyObject *args) \ _w ## func (PyObject *self, PyObject *args) \
{ \ { \
@ -1023,7 +1024,8 @@ _w ## func (PyObject *self, PyObject *args)
* Wrap LLVM functions of the type * Wrap LLVM functions of the type
* outtype func(intype1 arg1, enum_intype2 arg2, intype3 arg3, intype4 arg4, const char *arg5) * outtype func(intype1 arg1, enum_intype2 arg2, intype3 arg3, intype4 arg4, const char *arg5)
*/ */
#define _wrap_objenumobjobjstr2obj(func, intype1, intype2, intype3, intype4, outtype) \ #define _wrap_objenumobjobjstr2obj(func, intype1, intype2, intype3, \
intype4, outtype) \
static PyObject * \ static PyObject * \
_w ## func (PyObject *self, PyObject *args) \ _w ## func (PyObject *self, PyObject *args) \
{ \ { \