register PyObject *list;    register int i, j, k; int n; int pos = 0;   double val;  if (!PyArg_ParseTuple(args, "")) return NULL;   again: n = a->nnz; list = PyList_New(n); if (list == NULL) return NULL; if (n != a->nnz) {  Py_DECREF(list); goto again; }  if (!a->issym) { for (i = 0; i < a->dim[0]; i ++) { k = a->root[i]; while (k != -1) { j = a->col[k];  val = SpMatrix_LLMatGetItem(a, i, j);  PyList_SetItem(list, pos++, Py_BuildValue("((ii)d)", i, j, val));  k = a->link[k]; } } } else { PyErr_SetString(PyExc_NotImplementedError, "items() doesn't yet support symmetric matrices"); return NULL; }  return list;
PyObject *list;            int i, j, k; int pos = 0;                 double val;  if (!PyArg_ParseTuple(args, "")) return NULL;  if (!a->issym) {  if ((list = PyList_New(a->nnz)) == NULL) return NULL;  for (i = 0; i < a->dim[0]; i ++) { k = a->root[i]; while (k != -1) { j = a->col[k]; val = a->val[k]; PyList_SET_ITEM(list, pos++, Py_BuildValue("((ii)d)", i, j, val)); k = a->link[k]; } } return list;  } else { PyErr_SetString(PyExc_NotImplementedError, "items() doesn't yet support symmetric matrices"); return NULL; }
LLMat_items(register LLMatObject *a, PyObject *args){        register PyObject *list;   /* the list that will hold the values */	register int i, j, k;	int n;	int pos = 0;  /* position in list */	double val;	if (!PyArg_ParseTuple(args, ""))	  return NULL;  again:	n = a->nnz;	list = PyList_New(n);	if (list == NULL)		return NULL;	if (n != a->nnz) {	  /* (A little exception handler from the Python 2.4 source code.) */		Py_DECREF(list);		goto again;	}	if (!a->issym) {	  for (i = 0; i < a->dim[0]; i ++) {	    k = a->root[i];	    while (k != -1) {	      j = a->col[k];	      	      val = SpMatrix_LLMatGetItem(a, i, j);	      PyList_SetItem(list, pos++, Py_BuildValue("((ii)d)", i, j, val));	      	      k = a->link[k];	    }	  }	} else {	  PyErr_SetString(PyExc_NotImplementedError, 			  "items() doesn't yet support symmetric matrices");	  return NULL;	}	return list;}