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

Add support for mktemps #14347

Merged
merged 2 commits into from
May 25, 2020
Merged

Add support for mktemps #14347

merged 2 commits into from
May 25, 2020

Conversation

maxgrenderjones
Copy link
Contributor

Similar to python's tempfile add support for a suffix in mkstemp.

proc mkstemps*(tmpl: cstring, suffixlen: int): cint {.importc, header: "<stdlib.h>", sideEffect.}
## Creates a unique temporary file.
##
## **Warning**: The `tmpl` argument is written to by `mkstemp` and thus
Copy link
Member

Choose a reason for hiding this comment

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

typo: mkstemp => mkstemps

@timotheecour
Copy link
Member

@maxgrenderjones any reason this is in draft? IMO it's good to merge (and my nits can be addressed after merge) or, even better, you can update those nits

@maxgrenderjones maxgrenderjones marked this pull request as ready for review May 23, 2020 19:50
@maxgrenderjones
Copy link
Contributor Author

@maxgrenderjones any reason this is in draft? IMO it's good to merge (and my nits can be addressed after merge) or, even better, you can update those nits

More because I didn't know what I was doing and I hadn't tested a version of nim built with it. I have however tested the function standalone in my code (on OSX) and it works as desired.

Let me know if you need to squash the changes or whether you can do that in the merge (wasn't sure whether it would mess up reviewing). (Context for all this: I know hg well but am a total git novice)

@timotheecour
Copy link
Member

Thanks, its good as is, github ui can squas and merge.

@Araq Araq merged commit cbfe932 into nim-lang:devel May 25, 2020
EchoPouet pushed a commit to EchoPouet/Nim that referenced this pull request Jun 13, 2020
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.

3 participants