digest-murmurhash 0.2.3 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,39 +0,0 @@
1
- #include "murmurhash.h"
2
- #include "murmurhash1.h"
3
- #include "murmurhash2.h"
4
- #include "murmurhash2a.h"
5
-
6
- void
7
- Init_murmurhash(void)
8
- {
9
- VALUE mDigest, cDigest_StringBuffer;
10
- VALUE cDigest_MurmurHash1, cDigest_MurmurHash2, cDigest_MurmurHash2A;
11
-
12
- /* Digest::MurmurHash is require that Digest::StringBuffer */
13
- mDigest = rb_path2class("Digest");
14
- cDigest_StringBuffer = rb_path2class("Digest::StringBuffer");
15
-
16
- /* class Digest::MurmurHash1 < Digest::StringBuffer */
17
- cDigest_MurmurHash1 = rb_define_class_under(mDigest, "MurmurHash1", cDigest_StringBuffer);
18
- rb_define_private_method(cDigest_MurmurHash1, "finish", murmur1_finish, 0);
19
- rb_define_method(cDigest_MurmurHash1, "to_i", murmur1_to_i, 0);
20
- rb_define_singleton_method(cDigest_MurmurHash1, "digest", murmur1_s_digest, -1);
21
- rb_define_singleton_method(cDigest_MurmurHash1, "hexdigest", murmur1_s_hexdigest, -1);
22
- rb_define_singleton_method(cDigest_MurmurHash1, "rawdigest", murmur1_s_rawdigest, -1);
23
-
24
- /* class Digest::MurmurHash2 < Digest::StringBuffer */
25
- cDigest_MurmurHash2 = rb_define_class_under(mDigest, "MurmurHash2", cDigest_StringBuffer);
26
- rb_define_private_method(cDigest_MurmurHash2, "finish", murmur2_finish, 0);
27
- rb_define_method(cDigest_MurmurHash2, "to_i", murmur2_to_i, 0);
28
- rb_define_singleton_method(cDigest_MurmurHash2, "digest", murmur2_s_digest, -1);
29
- rb_define_singleton_method(cDigest_MurmurHash2, "hexdigest", murmur2_s_hexdigest, -1);
30
- rb_define_singleton_method(cDigest_MurmurHash2, "rawdigest", murmur2_s_rawdigest, -1);
31
-
32
- /* class Digest::MurmurHash2A < Digest::StringBuffer */
33
- cDigest_MurmurHash2A = rb_define_class_under(mDigest, "MurmurHash2A", cDigest_StringBuffer);
34
- rb_define_private_method(cDigest_MurmurHash2A, "finish", murmur2a_finish, 0);
35
- rb_define_method(cDigest_MurmurHash2A, "to_i", murmur2a_to_i, 0);
36
- rb_define_singleton_method(cDigest_MurmurHash2A, "digest", murmur2a_s_digest, -1);
37
- rb_define_singleton_method(cDigest_MurmurHash2A, "hexdigest", murmur2a_s_hexdigest, -1);
38
- rb_define_singleton_method(cDigest_MurmurHash2A, "rawdigest", murmur2a_s_rawdigest, -1);
39
- }