diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-02-22 19:24:55 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-02-23 13:14:28 -0800 |
commit | df3d3a0b09f05249aff9f25f558f988bfcad8874 (patch) | |
tree | c7812b1a69cd0acf95a93e4974483dcbccee8e1e /ext/raindrops/raindrops.c | |
parent | db192979f096d0153ad14e530e1e2e193289c7e0 (diff) | |
download | raindrops-df3d3a0b09f05249aff9f25f558f988bfcad8874.tar.gz |
This is the highest number a counter may be incremented to before it overflows.
Diffstat (limited to 'ext/raindrops/raindrops.c')
-rw-r--r-- | ext/raindrops/raindrops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/raindrops/raindrops.c b/ext/raindrops/raindrops.c index 599f39d..766ee02 100644 --- a/ext/raindrops/raindrops.c +++ b/ext/raindrops/raindrops.c @@ -203,6 +203,9 @@ void Init_raindrops_ext(void) #endif rb_define_const(cRaindrops, "SIZE", SIZET2NUM(raindrop_size)); + /* the maximum value a raindrop counter can hold */ + rb_define_const(cRaindrops, "MAX", ULONG2NUM((unsigned long)-1)); + rb_define_alloc_func(cRaindrops, alloc); rb_define_method(cRaindrops, "initialize", init, 1); |