Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Refactor writer #43

Merged
merged 10 commits into from
Mar 3, 2018
Merged

Refactor writer #43

merged 10 commits into from
Mar 3, 2018

Conversation

Therzok
Copy link
Contributor

@Therzok Therzok commented Mar 3, 2018

No description provided.

sundermann
sundermann previously approved these changes Mar 3, 2018
Copy link
Collaborator

@sundermann sundermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, though varargs marshalling might not be possible in .NET. There's no official support in the language but there is __arglist which is not documented and not part of the spec. It is also not in .NET Core.

@Therzok
Copy link
Contributor Author

Therzok commented Mar 3, 2018

Yeah, I know, I added those so marshalling can see it for now. We will have to have some kind of fixer at generator level that maps varargs to something known (i.e. what old gen has).

So, my initial idea was to crawl through generatables, look at all member generatables which have Varargs, and expand them into specific methods.

So Varargs will have an:
List<Parameter>[] attachment in metadata and for each method which takes a varargs, generate an expansion method.

__arglist only works on .NET Framework on windows, so these are the option

@Therzok
Copy link
Contributor Author

Therzok commented Mar 3, 2018

I'm trying to make the generator do a lot of the manual work we used to do, i.e. be able to generate GObject and GList by itself.

@Therzok Therzok merged commit 69814a7 into master Mar 3, 2018
@Therzok Therzok deleted the refactor-writer branch March 3, 2018 16:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants