return 1;
}
+#ifdef HAVE_RRD_GRAPH
+
static int
lua_rrd_graph (lua_State * L)
{
return 3;
}
+#endif
+
static int
lua_rrd_flushcached(lua_State *L)
{
return lua_rrd_infocall(L, "info", rrd_info);
}
+#ifdef HAVE_RRD_GRAPH
+
static int
lua_rrd_graphv (lua_State * L)
{
return lua_rrd_infocall(L, "graphv", rrd_graph_v);
}
+#endif
+
static int
lua_rrd_updatev (lua_State * L)
{
{"dump", lua_rrd_dump},
{"fetch", lua_rrd_fetch},
{"first", lua_rrd_first},
+#ifdef HAVE_RRD_GRAPH
{"graph", lua_rrd_graph},
+#endif
{"last", lua_rrd_last},
{"resize", lua_rrd_resize},
{"restore", lua_rrd_restore},
rrd_set_error("Expected the perl callback function to return a reference");
goto error_out;
}
- retHV = SvRV(retSV);
+ retHV = (HV*)SvRV(retSV);
if (SvTYPE(retHV) != SVt_PVHV) {
rrd_set_error("Expected the perl callback function to return a hash reference");
goto error_out;
rrd_set_error("Expected the perl callback function to return a valid data element");
goto error_out;
}
- retHV = SvRV(retSV);
+ retHV = (HV*)SvRV(retSV);
if (SvTYPE(retHV) != SVt_PVHV){
rrd_set_error("Expected the perl callback function to return data element pointing to a hash");
goto error_out;
rrd_set_error("Expected the perl callback function to return an array pointer for {data}->{%s}",(*ds_namv)[i]);
goto error_out_free_ds_namv;
}
- retAV = SvRV(retSV);
+ retAV = (AV*)SvRV(retSV);
if (SvTYPE(retAV) != SVt_PVAV){
rrd_set_error("Expected the perl callback function to return an array pointer for {data}->{%s}",(*ds_namv)[i]);
goto error_out_free_ds_namv;
}
for (i=0;i<*ds_cnt;i++){
- retAV = SvRV(HeVAL(hv_fetch_ent(retHV,sv_2mortal(newSVpv((*ds_namv)[i],0)),0,0)));
+ retAV = (AV*)SvRV(HeVAL(hv_fetch_ent(retHV,sv_2mortal(newSVpv((*ds_namv)[i],0)),0,0)));
for (ii=0;ii<rowCount;ii++){
SV** valP = av_fetch(retAV,ii,0);
SV* val = valP ? *valP : &PL_sv_undef;
OUTPUT:
RETVAL
+#ifdef HAVE_RRD_GRAPH
+
SV *
rrd_graph(...)
PROTOTYPE: @
PUSHs(sv_2mortal(newSViv(xsize)));
PUSHs(sv_2mortal(newSViv(ysize)));
+#endif /* HAVE_RRD_GRAPH */
+
SV *
rrd_fetch(...)
PROTOTYPE: @
OUTPUT:
RETVAL
+#ifdef HAVE_RRD_GRAPH
+
SV*
rrd_graphv(...)
PROTOTYPE: @
OUTPUT:
RETVAL
+#endif /* HAVE_RRD_GRAPH */
+
int
rrd_dump(...)
PROTOTYPE: @
return r;
}
+#ifdef HAVE_RRD_GRAPH
+
static char PyRRD_graph__doc__[] =
"graph(args..): Create a graph based on data from one or several RRD\n"
" graph filename [-s|--start seconds] "
return r;
}
+#endif /* HAVE_RRD_GRAPH */
+
static char PyRRD_tune__doc__[] =
"tune(args...): Modify some basic properties of a Round Robin Database\n"
" tune filename [--heartbeat|-h ds-name:heartbeat] "
return r;
}
+#ifdef HAVE_RRD_GRAPH
+
static char PyRRD_graphv__doc__[] =
"graphv is called in the same manner as graph";
return r;
}
+#endif /* HAVE_RRD_GRAPH */
+
static char PyRRD_updatev__doc__[] =
"updatev is called in the same manner as update";