Skip to content
Snippets Groups Projects
Commit f5ba01cf authored by Colin Walters's avatar Colin Walters
Browse files

dirfd: Have dfd iter _take_fd() take a pointer and do a steal

This avoids callers having to use `glnx_steal_fd()` on their own; in general, I
think we should implement move semantics like this at the callee level.

Another reason to do this is there's a subtle problem with doing:

```
somefunction (steal_value (&v), ..., error);
```

in that if `somefunction` throws, it may not have taken ownership of the value.
At least `glnx_dirfd_iterator_init_take_fd()` didn't.
parent 66d16287
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment