diff options
| author | Zachary Turner <zturner@google.com> | 2015-11-09 23:23:52 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-11-09 23:23:52 +0000 |
| commit | 88ab3c70e6baf0485a40e32eafde84739402b336 (patch) | |
| tree | 606dfd61a8d819a87c263afa662a7f1e6e334501 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
| parent | bfd3082e854bb18a9f94778fd9c256e0311324a6 (diff) | |
| download | bcm5719-llvm-88ab3c70e6baf0485a40e32eafde84739402b336.tar.gz bcm5719-llvm-88ab3c70e6baf0485a40e32eafde84739402b336.zip | |
Use PythonDataObjects in swig helper functions.
Relying on manual Python C API calls is error prone, especially
when trying to maintain compatibility with Python 2 and Python 3.
This patch additionally fixes what appears to be a potentially
serious memory leak, in that were were incref'ing two values
returned from the session dictionary but never decref'ing them.
There was a comment indicating that it was intentional, but the
reasoning was, I believe, faulty and it resulted in a legitimate
memory leak.
Switching everything to PythonObject based classes solves both
the compatibility issues as well as the resource leak issues.
llvm-svn: 252536
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
0 files changed, 0 insertions, 0 deletions

