Skip to content
Commit 88ab3c70 authored by Zachary Turner's avatar Zachary Turner
Browse files

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
parent bfd3082e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment