MCPcopy Index your code
hub / github.com/python/cpython / gen_error_codes

Function gen_error_codes

Tools/ssl/make_ssl_data.py:172–183  ·  view source on GitHub ↗

Generate error code table for error reasons.

(args)

Source from the content-addressed store, hash-verified

170
171
172def gen_error_codes(args):
173 """Generate error code table for error reasons."""
174 yield "/* generated from args.reasons */"
175 yield "static struct py_ssl_error_code error_codes[] = {"
176 for reason, libname, errname, num in args.reasons:
177 yield f" #ifdef {reason}"
178 yield f' {{"{errname}", ERR_LIB_{libname}, {reason}}},'
179 yield " #else"
180 yield f' {{"{errname}", {args.lib2errnum[libname]}, {num}}},'
181 yield " #endif"
182 yield " {NULL, 0, 0} /* sentinel */"
183 yield "};"
184
185
186def get_openssl_git_commit(args):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…