Skip to content
Discussion options

You must be logged in to vote

The patch almost works, but since C.libqt_string with members is not exported then I have to make my own type:

It is exported in more recent versions of the library under the C namespace here but it currently has an optional type in the definition so you currently need to use it as data.?.len and data.?.data.

If you want to patch it locally, the definition should be:

pub const libqt_string = C.libqt_string;

It could also be defined as:

pub const libqt_string = extern struct {
    len: usize = @import("std").mem.zeroes(usize),
    data: [*c]const u8 = @import("std").mem.zeroes([*c]const u8),
};

I'll include that fix in the patch. Sorry for all of the issues you're running into!

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@rcalixte
Comment options

@rcalixte
Comment options

@lifers
Comment options

@rcalixte
Comment options

Answer selected by lifers
@lifers
Comment options

@rcalixte
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants