Class: Spark::Digest::Murmur2
- Inherits:
-
Object
- Object
- Spark::Digest::Murmur2
- Defined in:
- ext/ruby_c/ruby-spark.c
Class Method Summary collapse
-
.digest(*args) ⇒ Object
Spark::Digest::Murmur2.digest.
Class Method Details
.digest(*args) ⇒ Object
Spark::Digest::Murmur2.digest
137 138 139 140 141 142 143 144 145 146 |
# File 'ext/ruby_c/murmur.c', line 137
VALUE method_murmur2_digest(int argc, VALUE *argv, VALUE klass)
{
if(argc == 0 || argc > 2){
rb_raise(rb_eArgError, "wrong number of arguments (%d for 1..2)", argc);
}
uint64_t seed = (argc == 1 ? 0 : NUM2UINT(argv[1]));
return murmur2_digest(argv[0], seed);
}
|