Fix C headers including both ddog_Vec_U8
and ddog_prof_Vec_U8
#83
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.
What does this PR do?:
In #73, we changed a number of types, functions and enums to be properly scoped inside or outside namespaces.
But while integrating the 1.0.1 release in Ruby, I noticed that by mistake I forgot to properly configure the renaming for
Vec_U8
, which resulted in two copies ofVec_U8
being emitted in the header files:ddog_Vec_U8
andddof_prof_Vec_U8
, with some APIs using one and others using the other.This PR fixes the configuration.
Motivation:
Having two copies of the same struct is not correct and is really annoying for clients as well -- I temporarily needed to duplicate a helper on the Ruby profiler to have variants for both types (since often we don't even use a pointer but the struct directly, you can't even cast between them).
Additional Notes:
Here's the diff for the generated headers before/after this change:
This is technically a breaking change for users of the C bindings, since a type gets removed (even if the type was never supposed to have existed).
Since #80 is already bumping the libdatadog version to 2.0.0, I suggest only merging this PR after that one, and including it in the 2.0.0 release.
How to test the change?:
This change doesn't actually affect the compiled library, only the header files. Thus, the only way of noticing and testing this change, is to compile something that includes the headers and validate that only
ddog_Vec_U8
gets used.