[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[py-rrdtool-cvs] [Commit] py-rrdtool/src _rrdtoolmodule.c
From: |
Hye-Shik Chang <address@hidden> |
Subject: |
[py-rrdtool-cvs] [Commit] py-rrdtool/src _rrdtoolmodule.c |
Date: |
Sat, 25 May 2002 20:21:33 -0400 |
perky 02/05/25 20:21:33
Modified: src _rrdtoolmodule.c
Log:
Change info.ds type to dictionary
Revision Changes Path
1.7 +6 -5 py-rrdtool/src/_rrdtoolmodule.c
Index: _rrdtoolmodule.c
===================================================================
RCS file: /cvsroot/py-rrdtool/py-rrdtool/src/_rrdtoolmodule.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- _rrdtoolmodule.c 24 May 2002 16:57:42 -0000 1.6
+++ _rrdtoolmodule.c 26 May 2002 00:21:33 -0000 1.7
@@ -4,10 +4,10 @@
* RRDTool Python binding
*
* Author : Hye-Shik Chang <address@hidden>
- * Date : $Date: 2002/05/24 16:57:42 $
+ * Date : $Date: 2002/05/26 00:21:33 $
* Created : 23 May 2002
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
*
==========================================================================
* This file is part of py-rrdtool.
@@ -29,7 +29,7 @@
*/
static char *version =
-"$Id: _rrdtoolmodule.c,v 1.6 2002/05/24 16:57:42 perky Exp $";
+"$Id: _rrdtoolmodule.c,v 1.7 2002/05/26 00:21:33 perky Exp $";
#include "Python.h"
#include "rrd.h"
@@ -384,7 +384,7 @@
DICTSET_CNT(r, "step", rrd.stat_head->pdp_step);
DICTSET_CNT(r, "last_update", rrd.live_head->last_up);
- ds = PyList_New(rrd.stat_head->ds_cnt);
+ ds = PyDict_New();
PyDict_SetItemString(r, "ds", ds);
Py_DECREF(ds);
@@ -392,7 +392,8 @@
PyObject *d;
d = PyDict_New();
- PyList_SET_ITEM(ds, i, d);
+ PyDict_SetItemString(ds, rrd.ds_def[i].ds_nam, d);
+ Py_DECREF(d);
DICTSET_STR(d, "type", rrd.ds_def[i].dst);
DICTSET_CNT(d, "minimal_heartbeat",
rrd.ds_def[i].par[DS_mrhb_cnt].u_cnt);