mirror of
https://github.com/libevent/libevent.git
synced 2025-01-31 09:12:55 +08:00
make it work with python2.2
svn:r267
This commit is contained in:
parent
226fd50a99
commit
3a15f7d4e4
@ -1189,7 +1189,11 @@ def GetNextStruct(file):
|
||||
|
||||
have_c_comment = 0
|
||||
data = ''
|
||||
for line in file:
|
||||
while 1:
|
||||
line = file.readline()
|
||||
if not line:
|
||||
break
|
||||
|
||||
line_count += 1
|
||||
line = line[:-1]
|
||||
|
||||
@ -1252,8 +1256,9 @@ def GetNextStruct(file):
|
||||
|
||||
|
||||
def Parse(file):
|
||||
"""Parses the input file and returns C code and corresponding header
|
||||
file."""
|
||||
"""
|
||||
Parses the input file and returns C code and corresponding header file.
|
||||
"""
|
||||
|
||||
entities = []
|
||||
|
||||
@ -1337,8 +1342,8 @@ def main(argv):
|
||||
|
||||
filename = argv[1]
|
||||
|
||||
if filename.split('.')[-1] != 'rpc':
|
||||
ext = filename.split('.')[-1]
|
||||
ext = filename.split('.')[-1]
|
||||
if ext != 'rpc':
|
||||
print >>sys.stderr, 'Unrecognized file extension: %s' % ext
|
||||
sys.exit(1)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user