- TAG*tag;
- PyObject*tagobject;
- int i = 0;
- mylog("taglist_item %08x(%d) [%d]", (int)self, self->ob_refcnt, index);
-
- if(index<0) {
- PyErr_SetString(PyExc_Exception, setError("Negative Indices not supported."));
- return NULL;
- }
-
- tag = taglist->firstTag;
- while(tag && i<index) {
- tag = tag->next;
- i++;
- }
- if(!tag || i != index) {
- if(index> i+10) {
- PyErr_SetString(PyExc_Exception, setError("No Tag at position %d", index));
- return NULL;
- }
-
- mylog("taglist_item %08x(%d)->IndexError (%d)", (int)self, self->ob_refcnt, index);
-
- Py_INCREF(PyExc_IndexError);
- PyErr_SetObject(PyExc_IndexError, Py_None);
- return NULL;
- }
-
- tagobject = tag_new2(tag);
- return (PyObject*)tagobject;
+ PyObject*tag;
+ mylog(" %08x(%d) taglist_item(%d)", (int)self, self->ob_refcnt, index);
+ tag = PyList_GetItem(taglist->taglist, index);
+ Py_INCREF(tag);
+ return tag;