Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing of "size_t const &" #173

Closed
syljua opened this issue Apr 6, 2017 · 2 comments
Closed

parsing of "size_t const &" #173

syljua opened this issue Apr 6, 2017 · 2 comments
Labels

Comments

@syljua
Copy link

syljua commented Apr 6, 2017

Parsing these prototypes;

size_t readData1(void *buffer, const size_t &count);
size_t readData2(void *buffer, size_t const &count);
size_t readData3(void *buffer, const size_t count);
size_t readData4(void *buffer, size_t const count);

Gives these results;

public native @Cast("size_t") long readData1(Pointer buffer, @Cast("const size_t") long count);
public native @Cast("size_t") long readData2(Pointer buffer, @Cast("size_t const*") @ByRef SizeTPointer count);
public native @Cast("size_t") long readData3(Pointer buffer, @Cast("const size_t") long count);
public native @Cast("size_t") long readData4(Pointer buffer, @Cast("size_t const") long count);

Somethings wrong with the result for readData2, I think.

I might also be related to the effect of parsing this;

size_t readData7(void *buffer, int const &count);

That will give 3 different results (where I do not think I'm happy with none of them)

public native @Cast("size_t") long readData7(Pointer buffer, @Const({false, true}) @ByRef IntPointer count);
public native @Cast("size_t") long readData7(Pointer buffer, @Const({false, true}) @ByRef IntBuffer count);
public native @Cast("size_t") long readData7(Pointer buffer, @Const({false, true}) @ByRef int[] count);

Where this;

size_t readData8(void *buffer, const int &count); size_t readData8(void *buffer, const int &count);

is correctly done as;

public native @Cast("size_t") long readData8(Pointer buffer, int count);

Thanks!

@saudet saudet added the bug label Apr 6, 2017
saudet added a commit that referenced this issue May 14, 2017
 * Fix `Parser` incorrectly recognizing values as pointers when `const` is placed after type (issue #173)
 * Add `Parser` support for C++11 `using` declarations that act as `typedef` (issue #169)
 * Let `Parser` accept variables initialized with parentheses (issue #179)
 * Fix `Parser` confusion between attributes and namespace-less templates (issue #181)
@saudet
Copy link
Member

saudet commented May 17, 2017

This should be fixed with the commit above. Let me know if you still have issues! Thanks

@saudet
Copy link
Member

saudet commented Jul 27, 2017

Fix released in version 1.3.3. Thanks for reporting!

@saudet saudet closed this as completed Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants