- char *name = PyString_AsString(value);
-
- if (!name)
- return EXPP_ReturnPyObjError( PyExc_TypeError,
- "expected a string");
-
- for (loop=self->prop->data.group.first; loop; loop=loop->next) {
- if (BSTR_EQ(loop->name, name)) Py_RETURN_TRUE;
+ int i;
+
+ for (i=0, loop=prop->data.group.first; loop; loop=loop->next, i++) {
+ PyObject *item= PyTuple_New(2);
+ PyTuple_SET_ITEM(item, 0, PyUnicode_FromString(loop->name));
+ PyTuple_SET_ITEM(item, 1, BPy_IDGroup_WrapData(id, loop));
+ PyList_SET_ITEM(seq, i, item);
+ }
+
+ if (i != prop->len) {
+ BPy_IDGroup_CorrectListLen(prop, seq, i);
+ Py_DECREF(seq); /*free the list*/
+ /*call self again*/
+ return BPy_Wrap_GetItems(id, prop);
+ }
+
+ return seq;
+}
+
+
+static PyObject *BPy_IDGroup_GetKeys(BPy_IDProperty *self)
+{
+ return BPy_Wrap_GetKeys(self->prop);
+}
+
+static PyObject *BPy_IDGroup_GetValues(BPy_IDProperty *self)
+{
+ return BPy_Wrap_GetValues(self->id, self->prop);
+}
+
+static PyObject *BPy_IDGroup_GetItems(BPy_IDProperty *self)
+{
+ return BPy_Wrap_GetItems(self->id, self->prop);
+}
+
+static int BPy_IDGroup_Contains(BPy_IDProperty *self, PyObject *value)
+{
+ char *name = _PyUnicode_AsString(value);
+
+ if (!name) {
+ PyErr_SetString( PyExc_TypeError, "expected a string");
+ return -1;