Author: Alex Gaynor <[email protected]>
Branch:
Changeset: r64891:4e6c24fe2fd0
Date: 2013-06-16 00:02 -0700
http://bitbucket.org/pypy/pypy/changeset/4e6c24fe2fd0/
Log: some random small cleanups
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