[pypy-commit] pypy default: remove unecessary check (arigato)

mattip pypy.commits at gmail.com
Mon Sep 12 15:07:33 EDT 2016


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r87053:59d1974a870e
Date: 2016-09-12 19:32 +0300
http://bitbucket.org/pypy/pypy/changeset/59d1974a870e/

Log:	remove unecessary check (arigato)

diff --git a/pypy/module/cpyext/memoryobject.py b/pypy/module/cpyext/memoryobject.py
--- a/pypy/module/cpyext/memoryobject.py
+++ b/pypy/module/cpyext/memoryobject.py
@@ -53,10 +53,7 @@
     else:
         n = len(fmt)
     for i in range(n):
-        if ord(fmt[i]) > 255:
-            view.c_format[i] = '*'
-        else:
-            view.c_format[i] = fmt[i]
+        view.c_format[i] = fmt[i]
     view.c_format[n] = '\x00'        
     shape = buf.getshape()
     strides = buf.getstrides()


More information about the pypy-commit mailing list