samdmarshall / libclang-nim

3 stars 3 forks source link

Cdecl required for callback procedure #1

Closed PMunch closed 5 months ago

PMunch commented 3 years ago

While using these bindings I couldn't get findIncludesInFiles to work, I just received a CXResult_Invalid. Turns out the procedure in the CXCursorAndRangeVisitor objects needs to be declared as a {.cdecl.}. This would likely apply to all such callbacks.

PMunch commented 3 years ago

Had similar issues with CXCursorVisitor.