This is an archive of the discontinued LLVM Phabricator instance.

Create PythonCallable and PythonTuple wrappers with appropriate unit tests
ClosedPublic

Authored by zturner on Nov 10 2015, 3:11 PM.

Details

Summary

This adds PythonTuple and PythonCallable classes to PythonDataObjects.

Additionally, unit tests are provided that exercise this functionality,
including invoking manipulating and checking for validity of tuples,
and invoking and checking for validity of callables using a variety
of different syntaxes.

The goal here is to eventually replace the code in python-wrapper.swig
that directly uses the Python C API to deal with callables and name
resolution with this code that can be more easily tested and debugged.

Note that this patch depends on D14524 (still pending review from Greg) before it can go in.

Diff Detail

Event Timeline

zturner updated this revision to Diff 39859.Nov 10 2015, 3:11 PM
zturner retitled this revision from to Create PythonCallable and PythonTuple wrappers with appropriate unit tests.
zturner updated this object.
zturner added reviewers: granata.enrico, clayborg.
zturner added a subscriber: lldb-commits.

Please also run Clang-tidy modernize checks.

source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp
895

Unnecessary line.

source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h
300

Should be PythonList() = default; Same for other similar default constructors.

337

Should be ~PythonTuple() override = default; Same for PythonCallable.

clayborg accepted this revision.Nov 11 2015, 10:33 AM
clayborg edited edge metadata.
This revision is now accepted and ready to land.Nov 11 2015, 10:33 AM
zturner closed this revision.Nov 11 2015, 12:20 PM