This is an archive of the discontinued LLVM Phabricator instance.

Move Py_buffer_RAII to .h file so SWIG 2 doesnt have to parse it
ClosedPublic

Authored by aadsm on Aug 21 2020, 3:32 PM.

Details

Summary

struct Py_buffer_RAII definition uses explicit deleted functions which are not supported by SWIG 2 (only 3).
To get around this I moved this struct to an .h file that is included to avoid being parsed by swig.

Diff Detail

Event Timeline

aadsm created this revision.Aug 21 2020, 3:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 21 2020, 3:32 PM
aadsm requested review of this revision.Aug 21 2020, 3:32 PM
lawrence_danna accepted this revision.Aug 21 2020, 3:55 PM

Looks fine to me, assuming that the tests pass.

This revision is now accepted and ready to land.Aug 21 2020, 3:55 PM
aadsm updated this revision to Diff 287144.Aug 21 2020, 6:35 PM

Added include guards, clang-format and python include

aadsm updated this revision to Diff 287149.Aug 21 2020, 7:22 PM

Moved the header file to be in Plugins/ScriptInterpreter/Python so clang-tidy doesn't get confused solving include paths.

aadsm updated this revision to Diff 287160.Aug 21 2020, 10:26 PM

After reading a bit more how clang-tidy works this isn't fixable because it actually needs to compile it. I also didn't find a way to exclude a file from it.
My plan is to just land this and then make a PR to add this file to https://github.com/google/llvm-premerge-checks/blob/master/scripts/clang-tidy.ignore

This revision was landed with ongoing or failed builds.Aug 22 2020, 10:44 AM
This revision was automatically updated to reflect the committed changes.