#include <Python.h>
#include <glib.h>
#include <glib-object.h>
#include <pygobject.h>

PyObject *
round_trip_gva(PyObject *self, PyObject *args)
{
	GValue tvalue = {0,}, *value = &tvalue;
	PyObject *obj;

	if (!PyArg_ParseTuple(args, "O", &obj))
		return NULL;
	g_value_init(value, G_TYPE_VALUE_ARRAY);
	if (pyg_value_from_pyobject(value, obj)) {
		PyErr_SetString(PyExc_TypeError, "Could not convert to GValueArray");
		return NULL;
	}
	return pyg_value_as_pyobject(value, FALSE);
}

static PyMethodDef GvaMethods[] = {
	{"round_trip_gva", round_trip_gva, METH_VARARGS, "Blah"},
	{NULL, NULL, 0, NULL}
};

PyMODINIT_FUNC
initgva(void)
{
	g_type_init();
	init_pygobject();
	(void) Py_InitModule("gva", GvaMethods);
}
