Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

deserialize longs properly

  • Loading branch information...
commit 62f481e7ace7e7ed7acae85ad3d5a3b4b7656891 1 parent 0fb81e0
@argv0 argv0 authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 c_src/basho_metrics_nifs.cpp
View
8 c_src/basho_metrics_nifs.cpp
@@ -101,9 +101,9 @@ ERL_NIF_TERM histogram_clear(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
ERL_NIF_TERM histogram_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
histogram_handle* handle;
- unsigned int sample;
+ unsigned long sample;
if (enif_get_resource(env,argv[0],histogram_RESOURCE,(void**)&handle) &&
- enif_get_uint(env, argv[1], &sample))
+ enif_get_ulong(env, argv[1], &sample))
{
handle->p->update(sample);
return ATOM_OK;
@@ -167,9 +167,9 @@ ERL_NIF_TERM meter_tick(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
ERL_NIF_TERM meter_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{
meter_handle* handle;
- unsigned int sample;
+ unsigned long sample;
if (enif_get_resource(env,argv[0],meter_RESOURCE,(void**)&handle) &&
- enif_get_uint(env, argv[1], &sample))
+ enif_get_ulong(env, argv[1], &sample))
{
handle->p->mark(sample);
return ATOM_OK;
Please sign in to comment.
Something went wrong with that request. Please try again.