[pypy-commit] pypy default: always pass nothing here

fijal noreply at buildbot.pypy.org
Wed Sep 25 11:37:53 CEST 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r67089:ff3f6477875a
Date: 2013-09-25 11:05 +0200
http://bitbucket.org/pypy/pypy/changeset/ff3f6477875a/

Log:	always pass nothing here

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
@@ -1682,14 +1682,10 @@
     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')
+        def tmpnam_llimpl():
+            return rffi.charp2str(os_tmpnam(lltype.nullptr(rffi.CCHARP.TO)))
 
-        return extdef([str], None, llimpl=tmpnam_llimpl,
+        return extdef([], None, llimpl=tmpnam_llimpl,
                       export_name="ll_os.ll_os_tmpnam")
 
 # --------------------------- os.stat & variants ---------------------------


More information about the pypy-commit mailing list