@@ -71,7 +71,7 @@ def preprocess(path):
71
71
lines = []
72
72
it = iter (fh )
73
73
74
- for l in it :
74
+ for line in it :
75
75
# zstd.h includes <stddef.h>, which is also included by cffi's
76
76
# boilerplate. This can lead to duplicate declarations. So we strip
77
77
# this include from the preprocessor invocation.
@@ -82,7 +82,7 @@ def preprocess(path):
82
82
# We define ZSTD_STATIC_LINKING_ONLY, which is redundant with the inline
83
83
# #define in zstdmt_compress.h and results in a compiler warning. So drop
84
84
# the inline #define.
85
- if l .startswith (
85
+ if line .startswith (
86
86
(
87
87
b"#include <stddef.h>" ,
88
88
b'#include "zstd.h"' ,
@@ -97,8 +97,8 @@ def preprocess(path):
97
97
# a bit hacky. But it gets the job done.
98
98
# TODO make limits.h work on Windows so we ensure INT_MAX is
99
99
# correct.
100
- if l .startswith (b"#include <limits.h>" ):
101
- l = b"#define INT_MAX 2147483647\n "
100
+ if line .startswith (b"#include <limits.h>" ):
101
+ line = b"#define INT_MAX 2147483647\n "
102
102
103
103
# ZSTDLIB_API may not be defined if we dropped zstd.h. It isn't
104
104
# important so just filter it out. Ditto for ZSTDLIB_STATIC_API and
@@ -108,10 +108,10 @@ def preprocess(path):
108
108
b"ZSTDLIB_STATIC_API" ,
109
109
b"ZDICTLIB_STATIC_API" ,
110
110
):
111
- if l .startswith (prefix ):
112
- l = l [len (prefix ) :]
111
+ if line .startswith (prefix ):
112
+ line = line [len (prefix ) :]
113
113
114
- lines .append (l )
114
+ lines .append (line )
115
115
116
116
fd , input_file = tempfile .mkstemp (suffix = ".h" )
117
117
os .write (fd , b"" .join (lines ))
@@ -209,7 +209,7 @@ def normalize_output(output):
209
209
sources .append (m .group (0 ) + b" ..." )
210
210
211
211
cdeflines = b"\n " .join (sources ).splitlines ()
212
- cdeflines = [l for l in cdeflines if l .strip ()]
212
+ cdeflines = [line for line in cdeflines if line .strip ()]
213
213
ffi .cdef (b"\n " .join (cdeflines ).decode ("latin1" ))
214
214
215
215
if __name__ == "__main__" :
0 commit comments