Commits

Alex Gaynor committed 4e6c24f

some random small cleanups

  • Participants
  • Parent commits 87bfc88

Comments (0)

Files changed (1)

rpython/rlib/ropenssl.py

+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']
     includes = []
 
 includes += [
-    'openssl/ssl.h', 
+    'openssl/ssl.h',
     'openssl/err.h',
     'openssl/rand.h',
     'openssl/evp.h',
 
 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,
     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',
         'OBJ_NAME',
         [('alias', rffi.INT),
          ('name', rffi.CCHARP),
-         ]) 
+         ])
 
 
 for k, v in rffi_platform.configure(CConfig).items():
 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,