}
if (!var)
srd_exception_catch("Failed to extract string value");
-
} else if (PyLong_Check(py_obj)) { /* integer */
int64_t val;
var = g_variant_new_int64(val);
else
srd_exception_catch("Failed to extract integer value");
-
} else if (PyFloat_Check(py_obj)) { /* float */
double val;
var = g_variant_new_double(val);
else
srd_exception_catch("Failed to extract float value");
-
} else {
srd_err("Failed to extract value of unsupported type.");
}