1090 static PyObject *
1091 getRNG (void)
1092 {
1093 /* PyModule_GetDict, PyDict_GetItemString return a borrowed ref */
1094 PyObject *module, *module_dict, *new_func, *rng;
1095
1096 module = PyImport_ImportModule ("Crypto.Random");
when PyImport_ImportModule() succeeds
1097 if (!module)
taking False path
1098 return NULL;
1099 module_dict = PyModule_GetDict (module);
1100 Py_DECREF (module);
when taking True path
1101 new_func = PyDict_GetItemString (module_dict, "new");
PyDict_GetItemString does not find string
1102 if (!PyCallable_Check (new_func))
when PyCallable_Check() returns 1 (true)
taking False path
1103 {
1104 PyErr_SetString (PyExc_RuntimeError,
1105 "Cryptor.Random.new is not callable.");
1106 return NULL;
1107 }
1108 rng = PyObject_CallObject (new_func, NULL);
calling PyObject_CallObject with NULL as argument 1 (new_func) at src/_fastmath.c:1108
PyObject_CallObject() looks up func->ob_type (within PyObject_Call within PyEval_CallObjectWithKeywords)
found 1 similar trace(s) to this
1109 return rng;
1110 }