Closed tatraian closed 6 years ago
Could you fill the https://github.com/legatoproject/legato-af/blob/master/CONTRIB_INDIVIDUAL.md or https://github.com/legatoproject/legato-af/blob/master/CONTRIB_COMPANY.md before we can accept your contribution (if that's not already done)?
More info at https://legato.io/legato-docs/latest/aboutLegatoContributing.html
Thanks!
I filled and sent.
Hello,
Ok! In this case the original solution should be dropped (parameter renaming) due to parameter selection. I'm not expert of this code, but I think the other solution can be implemented in C's api generation lib (codeGenHelpers.py). FormatParameterName
function should return a modified name (parameter.name + "_kw"
if parameter.name in keywords
.
Somewhere here: https://github.com/legatoproject/legato-af/blob/79ffa4bda300aeabf9280d5113168c9f418ade6d/framework/tools/ifgen/langC/codeGenHelpers.py#L86
Or if you have better idea please, share.
@kdunwoody has a provision that relies on mangling the parameter name (prepending with a _ to be precise) in case it matches a list of keywords. That would address the issue without updating the .api, and that should make it for 18.05.
Ok! Than I wait for the next release. I close this PR and you can close the bug if the release is out.
This change should address the issue: https://github.com/legatoproject/legato-af/commit/d3803ba46e57ccfe22a3b47d4e5750ea9c280aae
I also have an associated test that is in review internally.
I tested. And my C++ application could be compiled. Since I didn't wrote my C++ app, I just tested with assetData example. And that worked with this modification. As a solution for issue: #30