Changeset df9ad581c5767cba988269e70126a35992d71b39 for src/modules
- Timestamp:
- 11/08/10 19:52:37 (3 years ago)
- git-parent:
- Files:
-
- src/modules/lua.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
src/modules/lua.c
rc14d5c4 rdf9ad58 289 289 metric_type_t metric_type; 290 290 291 double __n ;292 int32_t __i ;293 u_int32_t __I ;294 int64_t __l ;295 u_int64_t __L ;291 double __n = 0.0; 292 int32_t __i = 0; 293 u_int32_t __I = 0; 294 int64_t __l = 0; 295 u_int64_t __L = 0; 296 296 297 297 if(lua_gettop(L) != 2) luaL_error(L, "wrong number of arguments"); … … 327 327 break; 328 328 case METRIC_INT32: 329 __i = luaL_optinteger(L, 2,0);329 __i = strtol(lua_tostring(L, 2), NULL, 10); 330 330 noit_stats_set_metric(&ci->current, metric_name, metric_type, &__i); 331 331 break; 332 332 case METRIC_UINT32: 333 __I = luaL_optinteger(L, 2,0);333 __I = strtoul(lua_tostring(L, 2), NULL, 10); 334 334 noit_stats_set_metric(&ci->current, metric_name, metric_type, &__I); 335 335 break; 336 336 case METRIC_INT64: 337 __l = luaL_optinteger(L, 2,0);337 __l = strtoll(lua_tostring(L, 2), NULL, 10); 338 338 noit_stats_set_metric(&ci->current, metric_name, metric_type, &__l); 339 339 break; 340 340 case METRIC_UINT64: 341 __L = luaL_optinteger(L, 2,0);341 __L = strtoull(lua_tostring(L, 2), NULL, 10); 342 342 noit_stats_set_metric(&ci->current, metric_name, metric_type, &__L); 343 343 break;
