Author: Maciej Fijalkowski <[email protected]>
Branch:
Changeset: r67083:61312092466f
Date: 2013-09-24 10:30 +0200
http://bitbucket.org/pypy/pypy/changeset/61312092466f/
Log: remerge the branch
diff --git a/rpython/rtyper/module/ll_os.py b/rpython/rtyper/module/ll_os.py
--- a/rpython/rtyper/module/ll_os.py
+++ b/rpython/rtyper/module/ll_os.py
@@ -1678,6 +1678,17 @@
return extdef([], str, llimpl=ctermid_llimpl,
export_name="ll_os.ll_os_ctermid")
+ @registering_if(os, 'tmpnam')
+ def register_os_tmpnam(self):
+ os_tmpnam = self.llexternal('tmpnam', [rffi.CCHARP], rffi.CCHARP)
+
+ def tmpnam_llimpl(name):
+ buf = rffi.str2charp(name)
+ try:
+ return rffi.charp2str(os_tmpnam(buf))
+ finally:
+ lltype.free(buf, flavor='raw')
+
# --------------------------- os.stat & variants ---------------------------
@registering(os.fstat)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit