~ubuntu-branches/ubuntu/precise/gst0.10-python/precise

« back to all changes in this revision

Viewing changes to gst/gsttaglist.override

Tags: upstream-0.10.8
Import upstream version 0.10.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
}
64
64
%%
65
65
override-slot GstTagList.tp_as_mapping
66
 
static int
67
 
_wrap_gst_tag_list_length(PyGObject *self)
 
66
static Py_ssize_t
 
67
_wrap_gst_tag_list_length(PyObject *self)
68
68
{
69
 
        return gst_structure_n_fields((GstStructure*)self->obj);
 
69
        PyGObject *gself = (PyGObject *)self;
 
70
        return gst_structure_n_fields((GstStructure*)gself->obj);
70
71
}
71
72
 
72
73
static PyObject *
113
114
}
114
115
 
115
116
static PyMappingMethods _wrap_gst_tag_list_tp_as_mapping = {
116
 
        (inquiry)_wrap_gst_tag_list_length,         /* mp_length */
 
117
        _wrap_gst_tag_list_length,         /* mp_length */
117
118
        (binaryfunc)_wrap_gst_tag_list_subscript,   /* mp_subscript */
118
119
        (objobjargproc)_wrap_gst_tag_list_ass_subscript /* mp_ass_subscript */
119
120
};
 
121
%%
 
122
override-slot GstTagList.tp_as_sequence
 
123
static int
 
124
_wrap_gst_tag_list_contains(PyGObject *self, PyObject *py_key)
 
125
{
 
126
        return gst_structure_has_field((GstStructure*)self->obj,
 
127
                                       PyString_AsString(py_key));
 
128
}
 
129
 
 
130
static PySequenceMethods _wrap_gst_tag_list_tp_as_sequence = {
 
131
        (lenfunc)NULL,
 
132
        (binaryfunc)NULL,
 
133
        (ssizeargfunc)NULL,
 
134
        (ssizeargfunc)NULL,
 
135
        (ssizessizeargfunc)NULL,
 
136
        (ssizeobjargproc)NULL,
 
137
        (ssizessizeobjargproc)NULL,
 
138
        (objobjproc)_wrap_gst_tag_list_contains,
 
139
        (binaryfunc)NULL,
 
140
        (ssizeargfunc)NULL,
 
141
};
 
142