static PyObject * pyev_default_loop(PyObject *module, PyObject *args, PyObject *kwargs) { if (!DefaultLoop) { DefaultLoop = new_Loop(&LoopType, args, kwargs, 1); } else { if (PyErr_WarnEx(PyExc_UserWarning, "returning the 'default loop' created earlier, " "arguments ignored (if provided).", 1)) { return NULL; } Py_INCREF(DefaultLoop); } return (PyObject *)DefaultLoop; }
/* LoopType.tp_new */ static PyObject * Loop_tp_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) { return (PyObject *)new_Loop(type, args, kwargs, 0); }