Skip to content

c: changed std::string_view to char* in WAD3.h#101

Merged
craftablescience merged 2 commits intocraftablescience:mainfrom
sheepy676:fix-c-vpkpp
Mar 19, 2026
Merged

c: changed std::string_view to char* in WAD3.h#101
craftablescience merged 2 commits intocraftablescience:mainfrom
sheepy676:fix-c-vpkpp

Conversation

@sheepy676
Copy link
Contributor

Does as the title says

Copy link
Owner

@craftablescience craftablescience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to change the cpp declaration as well

lang/c/src/vpkppc/format/WAD3.cpp L8-10

-const int8_t VPKPP_WAD3_FILENAME_MAX_SIZE   = WAD3_FILENAME_MAX_SIZE;
-const uint32_t VPKPP_WAD3_SIGNATURE         = WAD3_SIGNATURE;
-const std::string_view VPKPP_WAD3_EXTENSION = WAD3_EXTENSION.data();
+const int8_t VPKPP_WAD3_FILENAME_MAX_SIZE = WAD3_FILENAME_MAX_SIZE;
+const uint32_t VPKPP_WAD3_SIGNATURE       = WAD3_SIGNATURE;
+const char* VPKPP_WAD3_EXTENSION          = WAD3_EXTENSION.data();

@craftablescience craftablescience added the bug Something isn't working label Mar 19, 2026
@sheepy676
Copy link
Contributor Author

Sorry about that, when I compiled this and did a small test in C to see if it worked, nothing complained so I didn't notice that they were also declared in the cpp file. Should be fixed now

Copy link
Owner

@craftablescience craftablescience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@craftablescience craftablescience merged commit 0817000 into craftablescience:main Mar 19, 2026
6 checks passed
@sheepy676 sheepy676 deleted the fix-c-vpkpp branch March 19, 2026 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants