fix twrong_refcounts in nim cpp mode #10313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
twrong_refcounts was failing in cpp mode because
getRefcount
fromgets mangled as C++ in
nim cpp
:whereas on the import side:
gets the declaration mangled as
extern C
, notextern C++
, which points to a limitation we should address soon, such as ability to haveextern C
exportc procs innim cpp
( a few syntaxes were discussed; will be addressed in future PR's)So this PR introduces a workaround until we get ability to have
extern C
exportc procs innim cpp
after this PR and #10310 there'll be
12 last failing tests before we can enable removeallow_failures
forenv: NIM_COMPILE_TO_CPP=true
: