Skip to content

webgpu.h: Fix WGPU_WHOLE_SIZE causing linking errors.#34

Merged
Kangz merged 1 commit intowebgpu-native:masterfrom
Kangz:wgpu-whole-size
Feb 10, 2020
Merged

webgpu.h: Fix WGPU_WHOLE_SIZE causing linking errors.#34
Kangz merged 1 commit intowebgpu-native:masterfrom
Kangz:wgpu-whole-size

Conversation

@Kangz
Copy link
Collaborator

@Kangz Kangz commented Feb 5, 2020

The symbol was not marked as static and would cause linking errors
because it would be defined in multiple translation units. Replace it
with a more traditional C-style #define.

Found by @floooh.

The symbol was not marked as static and would cause linking errors
because it would be defined in multiple translation units. Replace it
with a more traditional C-style #define.

Found by @floooh.
@Kangz Kangz requested a review from kvark February 5, 2020 16:27
@kvark
Copy link
Collaborator

kvark commented Feb 5, 2020

would adding static make it stronger instead?

@floooh
Copy link

floooh commented Feb 5, 2020

static worked too when I tested, but since this is specifically a fix for the C language, IMHO a #define is the better choice - it's usually only the C++ people who have a problem with the C preprocessor ;)

@Kangz
Copy link
Collaborator Author

Kangz commented Feb 7, 2020

@kvark given the above, WDYT of using the #define?

Copy link
Collaborator

@kvark kvark left a comment

Choose a reason for hiding this comment

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

I don't have a strong preference here, we can proceed :)
Perhaps, somewhere close to MVP we can call some people who know what idiomatic C is, to review the header API.

@Kangz
Copy link
Collaborator Author

Kangz commented Feb 10, 2020

Thanks for the review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants