static PyObject* python_api_settings_int_get(PyObject *self, PyObject *args) { PyObject *group = NULL; PyObject *key = NULL; int def = 0; if (!PyArg_ParseTuple(args, "OOi", &group, &key, &def)) { Py_RETURN_NONE; } char *group_str = python_str_or_unicode_to_string(group); char *key_str = python_str_or_unicode_to_string(key); allow_python_threads(); int res = api_settings_int_get(group_str, key_str, def); free(group_str); free(key_str); disable_python_threads(); return Py_BuildValue("i", res); }
static int c_api_settings_int_get(char *group, char *key, int def) { return api_settings_int_get(group, key, def); }