meta_data_t *m = NULL;
PyObject *l;
- if (!meta)
+ if ((meta == NULL) || (meta == Py_None))
return NULL;
l = PyDict_Items(meta); /* New reference. */
cpy_log_exception("building meta data");
return NULL;
}
- m = meta_data_create();
s = PyList_Size(l);
+ if (s <= 0) {
+ Py_XDECREF(l);
+ return NULL;
+ }
+
+ m = meta_data_create();
for (i = 0; i < s; ++i) {
const char *string, *keystring;
PyObject *key, *value, *item, *tmp;
}
static PyMemberDef Values_members[] = {
- {"interval", T_INT, offsetof(Values, interval), 0, interval_doc},
+ {"interval", T_DOUBLE, offsetof(Values, interval), 0, interval_doc},
{"values", T_OBJECT_EX, offsetof(Values, values), 0, values_doc},
{"meta", T_OBJECT_EX, offsetof(Values, meta), 0, meta_doc},
{NULL}