aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Plangger <planrichi@gmail.com>2016-03-02 21:57:29 +0100
committerRichard Plangger <planrichi@gmail.com>2016-03-02 21:57:29 +0100
commit3c1786d6caf42360bb64cb0b2ab18e46c6ad1131 (patch)
treeca552ee8792b641319b7b5192059d882a4574874 /pypy/module/cpyext/pyfile.py
parentfix in assembly. 1 func for addr generation of gc_load/gc_store(_indexed) ins... (diff)
parentcleanup (diff)
downloadpypy-3c1786d6caf42360bb64cb0b2ab18e46c6ad1131.tar.gz
pypy-3c1786d6caf42360bb64cb0b2ab18e46c6ad1131.tar.bz2
pypy-3c1786d6caf42360bb64cb0b2ab18e46c6ad1131.zip
catchup default
Diffstat (limited to 'pypy/module/cpyext/pyfile.py')
-rw-r--r--pypy/module/cpyext/pyfile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/pypy/module/cpyext/pyfile.py b/pypy/module/cpyext/pyfile.py
index 628a90a2c7..5688f6ee37 100644
--- a/pypy/module/cpyext/pyfile.py
+++ b/pypy/module/cpyext/pyfile.py
@@ -1,7 +1,7 @@
from rpython.rtyper.lltypesystem import rffi, lltype
from pypy.module.cpyext.api import (
cpython_api, CANNOT_FAIL, CONST_STRING, FILEP, build_type_checkers)
-from pypy.module.cpyext.pyobject import PyObject, borrow_from
+from pypy.module.cpyext.pyobject import PyObject
from pypy.module.cpyext.object import Py_PRINT_RAW
from pypy.interpreter.error import OperationError
from pypy.module._file.interp_file import W_File
@@ -83,7 +83,8 @@ def PyFile_WriteObject(space, w_obj, w_p, flags):
@cpython_api([PyObject], PyObject)
def PyFile_Name(space, w_p):
"""Return the name of the file specified by p as a string object."""
- return borrow_from(w_p, space.getattr(w_p, space.wrap("name")))
+ w_name = space.getattr(w_p, space.wrap("name"))
+ return w_name # borrowed ref, should be a W_StringObject from the file
@cpython_api([PyObject, rffi.INT_real], rffi.INT_real, error=CANNOT_FAIL)
def PyFile_SoftSpace(space, w_p, newflag):