Compare commits

...

4 commits

Author SHA1 Message Date
Siu Kwan Lam
34900d2748 Update README.rst 2014-04-29 13:25:43 -05:00
Siu Kwan Lam
749b518b90 Update changelog 2014-04-28 11:06:48 -05:00
Siu Kwan Lam
c07fce0477 Update MANIFEST.in (#99) 2014-04-28 11:03:13 -05:00
Siu Kwan Lam
7f8476dd33 Fixing leaks (#92); thanks to ksshelt and eltjpm. 2014-04-04 15:14:47 -05:00
4 changed files with 19 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2014-04-28 0.12.5:
---------------------
* Fixes memory leaks (#92)
* Fixes tarball (#99)
2014-03-20 0.12.4: 2014-03-20 0.12.4:
--------------------- ---------------------
* Add dylib_import_library and friends * Add dylib_import_library and friends

View file

@ -1,5 +1,6 @@
include CHANGELOG LICENSE README setup.py MANIFEST.in include CHANGELOG LICENSE README.rst setup.py MANIFEST.in versioneer.py
recursive-include llvm * recursive-include llvm *
recursive-include llvmpy *
recursive-include www * recursive-include www *
recursive-include test * recursive-include test *
recursive-include tools * recursive-include tools *

View file

@ -30,10 +30,13 @@ Quickstart
to separate your custom build from the default system package. Please to separate your custom build from the default system package. Please
replace ``LLVM_INSTALL_PATH`` with your own path. replace ``LLVM_INSTALL_PATH`` with your own path.
3. Run ``REQUIRES_RTTI=1 make`` to build. 3. Run ``REQUIRES_RTTI=1 make install`` to build and install.
**Note**: With LLVM 3.2, the default build configuration has C++ RTTI **Note**: With LLVM 3.2, the default build configuration has C++ RTTI
disabled. However, llvmpy requires RTTI. disabled. However, llvmpy requires RTTI.
**Note**: Use ``make -j2 install`` to enable concurrent build.
Replace ``2`` with the actual number of processor you have.
4. Get llvm-py and install it:: 4. Get llvm-py and install it::

View file

@ -186,8 +186,8 @@ PyObject* iterator_to_pylist_deref(iterator begin, iterator end,
{ {
PyObject* list = PyList_New(0); PyObject* list = PyList_New(0);
for(; begin != end; ++begin) { for(; begin != end; ++begin) {
PyObject* cap = pycapsule_new(&*begin, capsuleName, className); auto_pyobject cap = pycapsule_new(&*begin, capsuleName, className);
PyList_Append(list, cap); PyList_Append(list, *cap);
} }
return list; return list;
} }
@ -198,8 +198,8 @@ PyObject* iterator_to_pylist(iterator begin, iterator end,
{ {
PyObject* list = PyList_New(0); PyObject* list = PyList_New(0);
for(; begin != end; ++begin) { for(; begin != end; ++begin) {
PyObject* cap = pycapsule_new(*begin, capsuleName, className); auto_pyobject cap = pycapsule_new(*begin, capsuleName, className);
PyList_Append(list, cap); PyList_Append(list, *cap);
} }
return list; return list;
} }
@ -575,11 +575,11 @@ PyObject* TargetMachine_addPassesToEmitFile(
bool status = TM->addPassesToEmitFile(PM, fso, FTy, disableVerify); bool status = TM->addPassesToEmitFile(PM, fso, FTy, disableVerify);
if (status) { if (status) {
StringRef sr = rso.str(); StringRef sr = rso.str();
PyObject* buf = PyString_FromStringAndSize(sr.data(), sr.size()); auto_pyobject buf = PyString_FromStringAndSize(sr.data(), sr.size());
if (!buf) { if (!buf) {
return NULL; return NULL;
} }
if (-1 == PyFile_WriteObject(buf, Out, Py_PRINT_RAW)){ if (-1 == PyFile_WriteObject(*buf, Out, Py_PRINT_RAW)){
return NULL; return NULL;
} }
Py_RETURN_TRUE; Py_RETURN_TRUE;
@ -891,7 +891,8 @@ public:
inline virtual void passEnumerate(const llvm::PassInfo * pass_info){ inline virtual void passEnumerate(const llvm::PassInfo * pass_info){
PyObject* passArg = PyString_FromString(pass_info->getPassArgument()); PyObject* passArg = PyString_FromString(pass_info->getPassArgument());
PyObject* passName = PyString_FromString(pass_info->getPassName()); PyObject* passName = PyString_FromString(pass_info->getPassName());
PyList_Append(List, Py_BuildValue("(OO)", passArg, passName)); auto_pyobject pair = Py_BuildValue("(OO)", passArg, passName);
PyList_Append(List, *pair);
} }
}; };