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

[Feature Request]: Change the definition of BIT7Z_STRING #167

Closed
1 task done
836454543 opened this issue Sep 12, 2023 · 2 comments
Closed
1 task done

[Feature Request]: Change the definition of BIT7Z_STRING #167

836454543 opened this issue Sep 12, 2023 · 2 comments
Assignees
Milestone

Comments

@836454543
Copy link

Feature description

If define BIT7Z_USE_NATIVE_STRING, the definition of BIT7Z_STRING is L##str.
This can be problematic in some cases.

/* define a macro called `STR` */
#define STR "hello"

/* use `BIT7Z_STRING` with `STR` */
BIT7Z_STRING(STR);  /* equal to `LSTR`, however `L"hello"` is expected */

The following is a better way to define BIT7Z_STRING

#define _BIT7Z_STRING(str) L##str
#define BIT7Z_STRING(str) _BIT7Z_STRING(str)

Additional context

No response

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Sep 12, 2023

Hi!
I think it might be helpful for the users of bit7z, so I've just pushed a commit to the branch release/v4.0.0 that changes the definition of BIT7Z_STRING as you suggested.

Thanks for the suggestion!

@rikyoz
Copy link
Owner

rikyoz commented Oct 1, 2023

Implemented in v4.0.0.

@rikyoz rikyoz closed this as completed Oct 1, 2023
@rikyoz rikyoz added this to the v4.0 milestone Oct 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants