MCPcopy Index your code
hub / github.com/RustPython/RustPython / parse_err_h

Function parse_err_h

scripts/make_ssl_data_rs.py:37–45  ·  view source on GitHub ↗

Parse err codes, e.g. ERR_LIB_X509: 11

(args)

Source from the content-addressed store, hash-verified

35
36
37def parse_err_h(args):
38 """Parse err codes, e.g. ERR_LIB_X509: 11"""
39 pat = re.compile(r"#\s*define\W+ERR_LIB_(\w+)\s+(\d+)")
40 lib2errnum = {}
41 for match in _file_search(args.err_h, pat):
42 libname, num = match.groups()
43 lib2errnum[libname] = int(num)
44
45 return lib2errnum
46
47
48def parse_openssl_error_text(args):

Callers 1

mainFunction · 0.85

Calls 3

_file_searchFunction · 0.85
compileMethod · 0.45
groupsMethod · 0.45

Tested by

no test coverage detected