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

Always use fully qualified names for imported types #21

Open
dhasenan opened this issue Jan 24, 2019 · 2 comments
Open

Always use fully qualified names for imported types #21

dhasenan opened this issue Jan 24, 2019 · 2 comments

Comments

@dhasenan
Copy link
Contributor

I'm trying to create bindings for webkit2gtk and friends. There's a type called Socket in there that wraps a gio Socket. This is a naming conflict currently, but if gir-to-d used qualified names by default, there would be no conflict.

@MikeWey
Copy link
Member

MikeWey commented Jan 24, 2019

gir-to-d should already do this when there is a conflict, ill take a look why it doesn't work for Webkit.

It seems to be working properly for things like gio.Application / gtk.Application.

@MikeWey
Copy link
Member

MikeWey commented Jan 24, 2019

gir-to-d currently only does that for parents that have the same name, but in the case of soup.ClientContext it imports two classes with the same name.

As a workaround you could use this in the lookup definition:

struct: ClientContext
import: gio.Socket : GioSock = Socket
structWrap: Gio.Socket GioSock

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

2 participants