Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r64928:f648d00a3854
Date: 2013-06-17 14:04 -0700
http://bitbucket.org/pypy/pypy/changeset/f648d00a3854/
Log: merge default
diff --git a/lib-python/2.7/logging/__init__.py
b/lib-python/2.7/logging/__init__.py
--- a/lib-python/2.7/logging/__init__.py
+++ b/lib-python/2.7/logging/__init__.py
@@ -134,6 +134,11 @@
DEBUG = 10
NOTSET = 0
+# NOTE(flaper87): This is different from
+# python's stdlib module since pypy's
+# dicts are much faster when their
+# keys are all of the same type.
+# Introduced in commit 9de7b40c586f
_levelToName = {
CRITICAL: 'CRITICAL',
ERROR: 'ERROR',
@@ -168,7 +173,11 @@
Otherwise, the string "Level %s" % level is returned.
"""
- return _levelToName.get(level, ("Level %s" % level))
+
+ # NOTE(flaper87): Check also in _nameToLevel
+ # if value is None.
+ return (_levelToName.get(level) or
+ _nameToLevel.get(level, ("Level %s" % level)))
def addLevelName(level, levelName):
"""
diff --git a/lib-python/2.7/test/test_logging.py
b/lib-python/2.7/test/test_logging.py
--- a/lib-python/2.7/test/test_logging.py
+++ b/lib-python/2.7/test/test_logging.py
@@ -278,6 +278,24 @@
def test_invalid_name(self):
self.assertRaises(TypeError, logging.getLogger, any)
+ def test_get_level_name(self):
+ """Test getLevelName returns level constant."""
+ # NOTE(flaper87): Bug #1517
+ self.assertEqual(logging.getLevelName('NOTSET'), 0)
+ self.assertEqual(logging.getLevelName('DEBUG'), 10)
+ self.assertEqual(logging.getLevelName('INFO'), 20)
+ self.assertEqual(logging.getLevelName('WARN'), 30)
+ self.assertEqual(logging.getLevelName('WARNING'), 30)
+ self.assertEqual(logging.getLevelName('ERROR'), 40)
+ self.assertEqual(logging.getLevelName('CRITICAL'), 50)
+
+ self.assertEqual(logging.getLevelName(0), 'NOTSET')
+ self.assertEqual(logging.getLevelName(10), 'DEBUG')
+ self.assertEqual(logging.getLevelName(20), 'INFO')
+ self.assertEqual(logging.getLevelName(30), 'WARNING')
+ self.assertEqual(logging.getLevelName(40), 'ERROR')
+ self.assertEqual(logging.getLevelName(50), 'CRITICAL')
+
class BasicFilterTest(BaseTest):
"""Test the bundled Filter class."""
diff --git a/lib_pypy/_tkinter/__init__.py b/lib_pypy/_tkinter/__init__.py
--- a/lib_pypy/_tkinter/__init__.py
+++ b/lib_pypy/_tkinter/__init__.py
@@ -8,7 +8,12 @@
class TclError(Exception):
pass
-from .tklib import tklib, tkffi
+import cffi
+try:
+ from .tklib import tklib, tkffi
+except cffi.VerificationError:
+ raise ImportError("Tk headers and development libraries are required")
+
from .app import TkApp
TK_VERSION = tkffi.string(tklib.get_tk_version())
diff --git a/lib_pypy/_tkinter/tklib.py b/lib_pypy/_tkinter/tklib.py
--- a/lib_pypy/_tkinter/tklib.py
+++ b/lib_pypy/_tkinter/tklib.py
@@ -31,13 +31,13 @@
char *bytes;
int length;
Tcl_ObjType *typePtr;
- union { /* The internal representation: */
- long longValue; /* - an long integer value. */
- double doubleValue; /* - a double-precision floating value. */
- struct { /* - internal rep as two pointers. */
- void *ptr1;
- void *ptr2;
- } twoPtrValue;
+ union { /* The internal representation: */
+ long longValue; /* - an long integer value. */
+ double doubleValue; /* - a double-precision floating value. */
+ struct { /* - internal rep as two pointers. */
+ void *ptr1;
+ void *ptr2;
+ } twoPtrValue;
} internalRep;
...;
} Tcl_Obj;
diff --git a/pypy/doc/how-to-contribute.rst b/pypy/doc/how-to-contribute.rst
--- a/pypy/doc/how-to-contribute.rst
+++ b/pypy/doc/how-to-contribute.rst
@@ -76,4 +76,4 @@
The rest of directories serve specific niche goal and are unlikely a good
entry point.
-.. _`introduction to RPython`: getting-started-dev.rst
+.. _`introduction to RPython`: getting-started-dev.html
diff --git a/pypy/doc/whatsnew-head.rst b/pypy/doc/whatsnew-head.rst
--- a/pypy/doc/whatsnew-head.rst
+++ b/pypy/doc/whatsnew-head.rst
@@ -52,3 +52,8 @@
.. branch: ctypes-byref
Add the '_obj' attribute on ctypes pointer() and byref() objects
+
+.. branch: argsort-segfault
+Fix a segfault in argsort when sorting by chunks on multidim numpypy arrays
(mikefc)
+
+.. branch: dtype-isnative
diff --git a/pypy/module/_cffi_backend/newtype.py
b/pypy/module/_cffi_backend/newtype.py
--- a/pypy/module/_cffi_backend/newtype.py
+++ b/pypy/module/_cffi_backend/newtype.py
@@ -5,6 +5,7 @@
from rpython.rlib.objectmodel import specialize
from rpython.rlib.rarithmetic import ovfcheck
from rpython.rtyper.lltypesystem import lltype, rffi
+from rpython.rtyper.tool import rffi_platform
from pypy.module._cffi_backend import (ctypeobj, ctypeprim, ctypeptr,
ctypearray, ctypestruct, ctypevoid, ctypeenum)
@@ -115,13 +116,15 @@
# ____________________________________________________________
SF_MSVC_BITFIELDS = 1
+SF_GCC_ARM_BITFIELDS = 2
if sys.platform == 'win32':
DEFAULT_SFLAGS = SF_MSVC_BITFIELDS
+elif rffi_platform.getdefined('__arm__', ''):
+ DEFAULT_SFLAGS = SF_GCC_ARM_BITFIELDS
else:
DEFAULT_SFLAGS = 0
-
@unwrap_spec(name=str)
def new_struct_type(space, name):
return ctypestruct.W_CTypeStruct(space, name)
@@ -180,7 +183,7 @@
# field is an anonymous bitfield
falign = ftype.alignof()
do_align = True
- if fbitsize >= 0:
+ if (sflags & SF_GCC_ARM_BITFIELDS) == 0 and fbitsize >= 0:
if (sflags & SF_MSVC_BITFIELDS) == 0:
# GCC: anonymous bitfields (of any size) don't cause alignment
do_align = (fname != '')
diff --git a/pypy/module/_cffi_backend/test/_backend_test_c.py
b/pypy/module/_cffi_backend/test/_backend_test_c.py
--- a/pypy/module/_cffi_backend/test/_backend_test_c.py
+++ b/pypy/module/_cffi_backend/test/_backend_test_c.py
@@ -2767,10 +2767,10 @@
('b1', BInt, 9),
('b2', BUInt, 7),
('c', BChar, -1)], -1, -1, -1, flag)
- if flag == 0: # gcc
+ if flag % 2 == 0: # gcc and gcc ARM
assert typeoffsetof(BStruct, 'c') == (BChar, 3)
assert sizeof(BStruct) == 4
- else: # msvc
+ else: # msvc
assert typeoffsetof(BStruct, 'c') == (BChar, 8)
assert sizeof(BStruct) == 12
assert alignof(BStruct) == 4
@@ -2783,7 +2783,10 @@
if flag == 0: # gcc
assert sizeof(BStruct) == 5
assert alignof(BStruct) == 1
- else: # msvc
+ elif flag == 1: # msvc
+ assert sizeof(BStruct) == 6
+ assert alignof(BStruct) == 2
+ else: # gcc ARM
assert sizeof(BStruct) == 6
assert alignof(BStruct) == 2
#
@@ -2795,10 +2798,15 @@
if flag == 0: # gcc
assert typeoffsetof(BStruct, 'c') == (BChar, 4)
assert sizeof(BStruct) == 5
- else: # msvc
+ assert alignof(BStruct) == 1
+ elif flag == 1: # msvc
assert typeoffsetof(BStruct, 'c') == (BChar, 1)
assert sizeof(BStruct) == 2
- assert alignof(BStruct) == 1
+ assert alignof(BStruct) == 1
+ else: # gcc ARM
+ assert typeoffsetof(BStruct, 'c') == (BChar, 4)
+ assert sizeof(BStruct) == 8
+ assert alignof(BStruct) == 4
def test_bitfield_as_gcc():
@@ -2807,6 +2815,9 @@
def test_bitfield_as_msvc():
_test_bitfield_details(flag=1)
+def test_bitfield_as_arm_gcc():
+ _test_bitfield_details(flag=2)
+
def test_version():
# this test is here mostly for PyPy
diff --git a/pypy/module/cpyext/unicodeobject.py
b/pypy/module/cpyext/unicodeobject.py
--- a/pypy/module/cpyext/unicodeobject.py
+++ b/pypy/module/cpyext/unicodeobject.py
@@ -11,8 +11,8 @@
make_typedescr, get_typedescr)
from pypy.module.cpyext.bytesobject import PyBytes_Check, PyBytes_FromObject
from pypy.module._codecs.interp_codecs import CodecState
-from pypy.objspace.std import unicodeobject, unicodetype, stringtype
-from rpython.rlib import runicode, rstring
+from pypy.objspace.std import unicodeobject, unicodetype
+from rpython.rlib import rstring, runicode
from rpython.tool.sourcetools import func_renamer
import sys
@@ -824,9 +824,9 @@
str = space.unicode_w(w_str)
substr = space.unicode_w(w_substr)
if rffi.cast(lltype.Signed, direction) <= 0:
- return stringtype.stringstartswith(str, substr, start, end)
+ return rstring.startswith(str, substr, start, end)
else:
- return stringtype.stringendswith(str, substr, start, end)
+ return rstring.endswith(str, substr, start, end)
@cpython_api([PyObject, PyObject, Py_ssize_t, Py_ssize_t], Py_ssize_t,
error=-1)
def PyUnicode_Count(space, w_str, w_substr, start, end):
diff --git a/pypy/module/micronumpy/arrayimpl/sort.py
b/pypy/module/micronumpy/arrayimpl/sort.py
--- a/pypy/module/micronumpy/arrayimpl/sort.py
+++ b/pypy/module/micronumpy/arrayimpl/sort.py
@@ -20,7 +20,7 @@
def make_sort_function(space, itemtype, comp_type, count=1):
TP = itemtype.T
step = rffi.sizeof(TP)
-
+
class Repr(object):
def __init__(self, index_stride_size, stride_size, size, values,
indexes, index_start, start):
@@ -71,11 +71,11 @@
def __init__(self, index_stride_size, stride_size, size):
start = 0
dtype = interp_dtype.get_dtype_cache(space).w_longdtype
- self.indexes = dtype.itemtype.malloc(size*dtype.get_size())
- self.values = alloc_raw_storage(size * stride_size,
+ indexes = dtype.itemtype.malloc(size*dtype.get_size())
+ values = alloc_raw_storage(size * stride_size,
track_allocation=False)
- Repr.__init__(self, index_stride_size, stride_size,
- size, self.values, self.indexes, start, start)
+ Repr.__init__(self, dtype.get_size(), stride_size,
+ size, values, indexes, start, start)
def __del__(self):
free_raw_storage(self.indexes, track_allocation=False)
@@ -96,7 +96,7 @@
for i in range(stop-start):
retval.setitem(i, lst.getitem(i+start))
return retval
-
+
if count < 2:
def arg_lt(a, b):
# Does numpy do <= ?
@@ -108,7 +108,7 @@
return True
elif a[0][i] > b[0][i]:
return False
- # Does numpy do True?
+ # Does numpy do True?
return False
ArgSort = make_timsort_class(arg_getitem, arg_setitem, arg_length,
@@ -180,7 +180,7 @@
class SortCache(object):
built = False
-
+
def __init__(self, space):
if self.built:
return
diff --git a/pypy/module/micronumpy/interp_dtype.py
b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -115,9 +115,27 @@
return space.wrap('=')
return space.wrap(nonnative_byteorder_prefix)
+ def descr_get_str(self, space):
+ size = self.get_size()
+ basic = self.kind
+ if basic == UNICODELTR:
+ size >>= 2
+ endian = byteorder_prefix
+ elif size <= 1:
+ endian = '|' # ignore
+ elif self.native:
+ endian = byteorder_prefix
+ else:
+ endian = nonnative_byteorder_prefix
+
+ return space.wrap("%s%s%s" % (endian, basic, size))
+
def descr_get_alignment(self, space):
return space.wrap(self.itemtype.alignment)
+ def descr_get_isnative(self, space):
+ return space.wrap(self.native)
+
def descr_get_base(self, space):
return space.wrap(self.base)
@@ -421,8 +439,10 @@
char = interp_attrproperty("char", cls=W_Dtype),
type = interp_attrproperty_w("w_box_type", cls=W_Dtype),
byteorder = GetSetProperty(W_Dtype.descr_get_byteorder),
+ str = GetSetProperty(W_Dtype.descr_get_str),
itemsize = GetSetProperty(W_Dtype.descr_get_itemsize),
alignment = GetSetProperty(W_Dtype.descr_get_alignment),
+ isnative = GetSetProperty(W_Dtype.descr_get_isnative),
shape = GetSetProperty(W_Dtype.descr_get_shape),
name = interp_attrproperty('name', cls=W_Dtype),
fields = GetSetProperty(W_Dtype.descr_get_fields),
@@ -582,7 +602,7 @@
alternate_constructors=[space.w_float,
space.gettypefor(interp_boxes.W_NumberBox),
],
- aliases=["float"],
+ aliases=["float", "double"],
)
self.w_complex64dtype = W_ComplexDtype(
types.Complex64(),
@@ -663,9 +683,10 @@
char='S',
w_box_type = space.gettypefor(interp_boxes.W_StringBox),
alternate_constructors=[space.w_str],
+ aliases=["str"],
)
self.w_unicodedtype = W_Dtype(
- types.UnicodeType(1),
+ types.UnicodeType(0),
num=19,
kind=UNICODELTR,
name='unicode',
diff --git a/pypy/module/micronumpy/interp_numarray.py
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -418,8 +418,16 @@
addr = self.implementation.get_storage_as_int(space)
# will explode if it can't
w_d = space.newdict()
- space.setitem_str(w_d, 'data', space.newtuple([space.wrap(addr),
- space.w_False]))
+ space.setitem_str(w_d, 'data',
+ space.newtuple([space.wrap(addr), space.w_False]))
+ space.setitem_str(w_d, 'shape', self.descr_get_shape(space))
+ space.setitem_str(w_d, 'typestr',
self.get_dtype().descr_get_str(space))
+ if self.implementation.order == 'C':
+ # Array is contiguous, no strides in the interface.
+ strides = space.w_None
+ else:
+ strides = self.descr_get_strides(space)
+ space.setitem_str(w_d, 'strides', strides)
return w_d
w_pypy_data = None
diff --git a/pypy/module/micronumpy/test/test_dtypes.py
b/pypy/module/micronumpy/test/test_dtypes.py
--- a/pypy/module/micronumpy/test/test_dtypes.py
+++ b/pypy/module/micronumpy/test/test_dtypes.py
@@ -682,6 +682,20 @@
assert dtype('=i8').byteorder == '='
assert dtype(byteorder + 'i8').byteorder == '='
+ def test_dtype_str(self):
+ from numpypy import dtype
+ byteorder = self.native_prefix
+ assert dtype('i8').str == byteorder + 'i8'
+ assert dtype('<i8').str == '<i8'
+ assert dtype('>i8').str == '>i8'
+ assert dtype('int8').str == '|i1'
+ assert dtype('float').str == byteorder + 'f8'
+ # strange
+ assert dtype('string').str == '|S0'
+ assert dtype('unicode').str == byteorder + 'U0'
+ # assert dtype(('string', 7)).str == '|S7'
+ # assert dtype(('unicode', 7)).str == '<U7'
+
def test_intp(self):
from numpypy import dtype
assert dtype('p') == dtype('intp')
@@ -691,6 +705,11 @@
from numpypy import dtype
assert dtype('i4').alignment == 4
+ def test_isnative(self):
+ from numpypy import dtype
+ assert dtype('i4').isnative == True
+ assert dtype('>i8').isnative == False
+
def test_any_all(self):
import numpypy as numpy
x = numpy.bool_(True)
diff --git a/pypy/module/micronumpy/test/test_numarray.py
b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -2138,6 +2138,9 @@
a = array([1, 2, 3])
i = a.__array_interface__
assert isinstance(i['data'][0], int)
+ assert i['shape'] == (3,)
+ assert i['strides'] == None # Because array is in C order
+ assert i['typestr'] == a.dtype.str
a = a[::2]
i = a.__array_interface__
assert isinstance(i['data'][0], int)
@@ -2496,6 +2499,13 @@
b = a.argsort()
assert (b[:3] == [0, 100, 200]).all()
+ def test_argsort_random(self):
+ from numpypy import array
+ from _random import Random
+ rnd = Random(1)
+ a = array([rnd.random() for i in range(512*2)]).reshape(512,2)
+ a.argsort()
+
def test_argsort_axis(self):
from numpypy import array
a = array([[4, 2], [1, 3]])
diff --git a/pypy/module/test_lib_pypy/cffi_tests/test_ffi_backend.py
b/pypy/module/test_lib_pypy/cffi_tests/test_ffi_backend.py
--- a/pypy/module/test_lib_pypy/cffi_tests/test_ffi_backend.py
+++ b/pypy/module/test_lib_pypy/cffi_tests/test_ffi_backend.py
@@ -1,5 +1,6 @@
# Generated by pypy/tool/import_cffi.py
-import py, sys
+import py, sys, platform
+import pytest
from pypy.module.test_lib_pypy.cffi_tests import backend_tests, test_function,
test_ownlib
from cffi import FFI
import _cffi_backend
@@ -122,6 +123,7 @@
self.check("int a:2; short b:15; char c:2; char y;", 5, 4, 8)
self.check("int a:2; char b:1; char c:1; char y;", 1, 4, 4)
+ @pytest.mark.skipif("platform.machine().startswith('arm')")
def test_bitfield_anonymous_no_align(self):
L = FFI().alignof("long long")
self.check("char y; int :1;", 0, 1, 2)
@@ -134,6 +136,20 @@
self.check("char x; long long z:57; char y;", L + 8, L, L + 8 + L)
self.check("char x; long long :57; char y;", L + 8, 1, L + 9)
+ @pytest.mark.skipif("not platform.machine().startswith('arm')")
+ def test_bitfield_anonymous_align_arm(self):
+ L = FFI().alignof("long long")
+ self.check("char y; int :1;", 0, 4, 4)
+ self.check("char x; int z:1; char y;", 2, 4, 4)
+ self.check("char x; int :1; char y;", 2, 4, 4)
+ self.check("char x; long long z:48; char y;", 7, L, 8)
+ self.check("char x; long long :48; char y;", 7, 8, 8)
+ self.check("char x; long long z:56; char y;", 8, L, 8 + L)
+ self.check("char x; long long :56; char y;", 8, L, 8 + L)
+ self.check("char x; long long z:57; char y;", L + 8, L, L + 8 + L)
+ self.check("char x; long long :57; char y;", L + 8, L, L + 8 + L)
+
+ @pytest.mark.skipif("platform.machine().startswith('arm')")
def test_bitfield_zero(self):
L = FFI().alignof("long long")
self.check("char y; int :0;", 0, 1, 4)
@@ -144,6 +160,17 @@
self.check("char x; int :0; short b:1; char y;", 5, 2, 6)
self.check("int a:1; int :0; int b:1; char y;", 5, 4, 8)
+ @pytest.mark.skipif("not platform.machine().startswith('arm')")
+ def test_bitfield_zero_arm(self):
+ L = FFI().alignof("long long")
+ self.check("char y; int :0;", 0, 4, 4)
+ self.check("char x; int :0; char y;", 4, 4, 8)
+ self.check("char x; int :0; int :0; char y;", 4, 4, 8)
+ self.check("char x; long long :0; char y;", L, 8, L + 8)
+ self.check("short x, y; int :0; int :0;", 2, 4, 4)
+ self.check("char x; int :0; short b:1; char y;", 5, 4, 8)
+ self.check("int a:1; int :0; int b:1; char y;", 5, 4, 8)
+
def test_error_cases(self):
ffi = FFI()
py.test.raises(TypeError,
diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -675,6 +675,7 @@
raise OperationError(space.w_ValueError,
space.wrap("list modified during sort"))
+find_jmp = jit.JitDriver(greens = [], reds = 'auto', name = 'list.find')
class ListStrategy(object):
sizehint = -1
@@ -699,6 +700,7 @@
i = start
# needs to be safe against eq_w mutating stuff
while i < stop and i < w_list.length():
+ find_jmp.jit_merge_point()
if space.eq_w(w_list.getitem(i), w_item):
return i
i += 1
diff --git a/pypy/tool/pytest/appsupport.py b/pypy/tool/pytest/appsupport.py
--- a/pypy/tool/pytest/appsupport.py
+++ b/pypy/tool/pytest/appsupport.py
@@ -1,3 +1,5 @@
+from inspect import CO_VARARGS, CO_VARKEYWORDS
+
import py
from pypy.interpreter import gateway, pycode
from pypy.interpreter.error import OperationError
@@ -35,8 +37,13 @@
return None
fullsource = property(fullsource, None, None, "Full source of AppCode")
- def getargs(self):
- return self.raw.co_varnames[:self.raw.co_argcount]
+ def getargs(self, var=False):
+ raw = self.raw
+ argcount = raw.co_argcount
+ if var:
+ argcount += raw.co_flags & CO_VARARGS
+ argcount += raw.co_flags & CO_VARKEYWORDS
+ return raw.co_varnames[:argcount]
class AppFrame(py.code.Frame):
@@ -70,10 +77,10 @@
def is_true(self, w_value):
return self.space.is_true(w_value)
- def getargs(self):
+ def getargs(self, var=False):
space = self.space
retval = []
- for arg in self.code.getargs():
+ for arg in self.code.getargs(var):
w_val = space.finditem(self.w_locals, space.wrap(arg))
if w_val is None:
w_val = space.wrap('<no value found>')
diff --git a/rpython/rlib/ropenssl.py b/rpython/rlib/ropenssl.py
--- a/rpython/rlib/ropenssl.py
+++ b/rpython/rlib/ropenssl.py
@@ -1,13 +1,12 @@
+import sys
+
from rpython.rtyper.lltypesystem import rffi, lltype
from rpython.rtyper.tool import rffi_platform
from rpython.translator.platform import platform
from rpython.translator.tool.cbuild import ExternalCompilationInfo
from rpython.rlib.unroll import unrolling_iterable
-import sys, os
-link_files = []
-include_dirs = []
if sys.platform == 'win32' and platform.name != 'mingw32':
libraries = ['libeay32', 'ssleay32', 'zlib1',
'user32', 'advapi32', 'gdi32', 'msvcrt', 'ws2_32']
@@ -24,7 +23,7 @@
includes = []
includes += [
- 'openssl/ssl.h',
+ 'openssl/ssl.h',
'openssl/err.h',
'openssl/rand.h',
'openssl/evp.h',
@@ -33,16 +32,14 @@
eci = ExternalCompilationInfo(
libraries = libraries,
- link_files = link_files,
includes = includes,
- include_dirs = include_dirs,
export_symbols = [],
post_include_bits = [
# Unnamed structures are not supported by rffi_platform.
# So we replace an attribute access with a macro call.
'#define pypy_GENERAL_NAME_dirn(name) (name->d.dirn)',
- ],
- )
+ ],
+)
eci = rffi_platform.configure_external_library(
'openssl', eci,
@@ -114,7 +111,7 @@
X509_extension_st = rffi_platform.Struct(
'struct X509_extension_st',
[('value', ASN1_STRING)])
- X509V3_EXT_D2I = lltype.FuncType([rffi.VOIDP, rffi.CCHARPP, rffi.LONG],
+ X509V3_EXT_D2I = lltype.FuncType([rffi.VOIDP, rffi.CCHARPP, rffi.LONG],
rffi.VOIDP)
v3_ext_method = rffi_platform.Struct(
'struct v3_ext_method',
@@ -137,7 +134,7 @@
'OBJ_NAME',
[('alias', rffi.INT),
('name', rffi.CCHARP),
- ])
+ ])
for k, v in rffi_platform.configure(CConfig).items():
@@ -259,11 +256,11 @@
ssl_external('ASN1_STRING_to_UTF8', [rffi.CCHARPP, ASN1_STRING], rffi.INT)
ssl_external('ASN1_TIME_print', [BIO, ASN1_TIME], rffi.INT)
ssl_external('i2a_ASN1_INTEGER', [BIO, ASN1_INTEGER], rffi.INT)
-ssl_external('ASN1_item_d2i',
+ssl_external('ASN1_item_d2i',
[rffi.VOIDP, rffi.CCHARPP, rffi.LONG, ASN1_ITEM], rffi.VOIDP)
-if OPENSSL_EXPORT_VAR_AS_FUNCTION:
+if OPENSSL_EXPORT_VAR_AS_FUNCTION:
ssl_external('ASN1_ITEM_ptr', [ASN1_ITEM_EXP], ASN1_ITEM, macro=True)
-else:
+else:
ssl_external('ASN1_ITEM_ptr', [rffi.VOIDP], ASN1_ITEM, macro=True)
ssl_external('sk_GENERAL_NAME_num', [GENERAL_NAMES], rffi.INT,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit