-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add support for mktemps #14347
Conversation
lib/posix/posix.nim
Outdated
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: mkstemp
=> mkstemps
@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 |
Thanks, its good as is, github ui can squas and merge. |
Similar to python's
tempfile
add support for a suffix in mkstemp.