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

Define Display as c_void instead of *mut c_void to match Xlib #751

Merged
merged 1 commit into from
May 6, 2023

Conversation

MarijnS95
Copy link
Collaborator

Fixes #749

Xlib defines Display as follows:

typedef struct _XDisplay Display;

And then always references this type as a pointer to it, e.g. Display *. The same happens in ash, where Display is only ever referenced as a raw pointer via *mut Display, so making Display itself a type alias to *mut c_void is wrong and confusing. Switch it back to a c_void to match the forward-declared (but otherwise undefined) struct _XDisplay.

@MarijnS95 MarijnS95 force-pushed the platform-types-display-match-xlib branch from 3d1f687 to 6605992 Compare May 6, 2023 18:14
Xlib defines `Display` as follows:

    typedef struct _XDisplay Display;

And then always references this type as a pointer to it, e.g. `Display
*`.  The same happens in `ash`, where `Display` is only ever referenced
as a raw pointer via `*mut Display`, so making `Display` itself a type
alias to `*mut c_void` is wrong and confusing.  Switch it back to a
`c_void` to match the forward-declared (but otherwise undefined) `struct
_XDisplay`.
@MarijnS95 MarijnS95 force-pushed the platform-types-display-match-xlib branch from 6605992 to ea5787f Compare May 6, 2023 18:15
@MarijnS95 MarijnS95 merged commit 8b11513 into master May 6, 2023
@MarijnS95 MarijnS95 deleted the platform-types-display-match-xlib branch May 6, 2023 18:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ash::vk::Display is defined as *const c_void while it should just be c_void
2 participants