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

How to generate std::vector<guint8> type #92

Open
Jackie-Yang opened this issue Dec 11, 2019 · 2 comments
Open

How to generate std::vector<guint8> type #92

Jackie-Yang opened this issue Dec 11, 2019 · 2 comments

Comments

@Jackie-Yang
Copy link

I try to use type="ay", but it will generage std::string.

@mardy
Copy link
Contributor

mardy commented Dec 11, 2019

I don't know why it was decided to map "ay" to std::string, but it makes some sense, since std::string can also contain NULL bytes.

On the other hand, it would be nice if gdbus-codegen-glibmm supported D-Bus type annotations and allowed the developer to choose the C++ type (like QtDBus does).

@martin-ejdestig
Copy link
Contributor

martin-ejdestig commented Dec 11, 2019

See also #82 . (I think it comes from the fact that "ay" is treated as a '\0' terminated string, char *, in Glib instead of e.g. a GByteArray. Glib even requires "ay" to be '\0' terminated to function correctly. Even though there is no such requirement in D-Bus, of course.)

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

No branches or pull requests

3 participants