Skip to content
Discussion options

You must be logged in to vote

Hey Alessandro, thanks for your interest in Solod! You declare union types as regular structs with the so:extern directive:

//so:extern SDL_CommonEvent
type SDL_CommonEvent struct {
	// ...
}

//so:extern SDL_DisplayEvent
type SDL_DisplayEvent struct {
	// ...
}

//so:extern SDL_Event
type SDL_Event struct {
	common  SDL_CommonEvent
    display SDL_DisplayEvent
    // ...
}

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by nalgeon
Comment options

You must be logged in to vote
1 reply
@taleeus
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