SIGN IN SIGN UP

Fix CID-1414686: PyInit_readline() handles errors (#4647)

Handle PyModule_AddIntConstant() and PyModule_AddStringConstant()
failures. Add also constants before calling setup_readline(), since
setup_readline() registers callbacks which uses a reference to the
module, whereas the module is destroyed if adding constants fails.

Fix Coverity warning:

CID 1414686: Unchecked return value (CHECKED_RETURN)
2. check_return: Calling PyModule_AddStringConstant without checking
return value (as is done elsewhere 45 out of 55 times).
V
Victor Stinner committed
0efc0249ca1fd0675098957407fbba2c0f6949ce
Parent: 86afc1f
Committed by GitHub <noreply@github.com> on 11/30/2017, 4:21:07 PM