Skip to content

add some dip1000 attributes#226

Open
WebFreak001 wants to merge 1 commit intovibe-d:masterfrom
WebFreak001:dip1000-part1
Open

add some dip1000 attributes#226
WebFreak001 wants to merge 1 commit intovibe-d:masterfrom
WebFreak001:dip1000-part1

Conversation

@WebFreak001
Copy link

No description provided.

`cancelRead` was called before issuing the next call to `read`.
*/
void write(FileFD file, ulong offset, const(ubyte)[] buffer, IOMode mode, FileIOCallback on_write_finish);
void write(FileFD file, ulong offset, return const(ubyte)[] buffer, IOMode mode, return FileIOCallback on_write_finish);
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be scope instead? What does return mean when there is no return value? I guess I should do more research of what DIP1000 has become by now, but somehow I can't really force myself to do that.

Copy link
Author

@WebFreak001 WebFreak001 Nov 17, 2023

Choose a reason for hiding this comment

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

I think the return means that the parameter is then stored on the this object, aka the lifetime of the this object must be larger than the parameter's lifetime, since we are inside a class, although I haven't verified that.

It does make sense for that is how it works in the constructor and what it means to annotate the function itself as return.

Copy link
Author

Choose a reason for hiding this comment

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

after quick testing, it seems that return and scope on classes is a mess

but at least compilation works without warnings for now lol

@s-ludwig
Copy link
Member

Unfortunately we get some compiler crashes for the older compiler versions with the changes. With a bit of luck, we could just bump the minimum supported version to 2.095.1/1.25.1 and just side step the issue.

There are also some adjustments needed for the win32 build.

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

Successfully merging this pull request may close these issues.

2 participants