[cindex.py] Add helper to initialize libclang functions

The helper allows us to define how the initialization of functions should
behave. We use this patch to provide an informative error message, in case a
function is not available:

"LibclangError: /home/grosser/Projekte/llvm/install/lib/libclang.so: undefined
symbol: clang_method_added_in_2020. Please ensure that your python bindings are
compatible with your libclang.so version."

This patch also ensures that no spelling mistakes slip into the library
initialization. At the moment, there are a couple of 'argtype' -> 'argtypes'
mispellings that have been overlooked.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163057 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed