rrdtool/rrdtool-1.3beta4-fix-python-bindings-rrdtool-info.patch

37 lines
1.2 KiB
Diff
Raw Normal View History

Index: rrdtool/bindings/python/rrd_extra.h
===================================================================
--- rrdtool/bindings/python/rrd_extra.h (revision 1306)
+++ rrdtool/bindings/python/rrd_extra.h (revision 1332)
@@ -54,5 +54,4 @@
int rrd_open(
char *file_name,
- FILE ** in_file,
rrd_t *rrd,
int rdwr);
Index: rrdtool/bindings/python/rrdtoolmodule.c
===================================================================
--- rrdtool/bindings/python/rrdtoolmodule.c (revision 1306)
+++ rrdtool/bindings/python/rrdtoolmodule.c (revision 1332)
@@ -412,5 +412,4 @@
PyObject *r, *t, *ds;
rrd_t rrd;
- FILE *in_file;
char *filename;
unsigned long i, j;
@@ -419,10 +418,9 @@
return NULL;
- if (rrd_open(filename, &in_file, &rrd, RRD_READONLY) == -1) {
- PyErr_SetString(ErrorObject, rrd_get_error());
- rrd_clear_error();
- return NULL;
- }
- fclose(in_file);
+ if (!rrd_open(filename, &rrd, RRD_READONLY) == -1) {
+ PyErr_SetString(ErrorObject, rrd_get_error());
+ rrd_clear_error();
+ return NULL;
+ }
#define DICTSET_STR(dict, name, value) \