class_stat 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/class_stat/class_stat.c +4 -3
- data/lib/class_stat/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e86fe919f9c58c5895c43d356e17c26bd0f080b6
|
4
|
+
data.tar.gz: 0186a5ff40b80d01627a32efff3e52243c2972c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 020348453aef883605af8c179795a2193675f2cce19d0e2ff29963b1ceae5b6b86633c310f70e2b9f6744e1dd696831b88c7e73fab7b391bc67f0815d6d52159
|
7
|
+
data.tar.gz: ffaa2076be70605d2f536dcbc75a91c353b3c6565b8a8b7f52de8409c28172e9debb75ddb9a96b58732193a49735439e875f577c94d276c2aa48313684c1240f
|
data/ext/class_stat/class_stat.c
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
|
2
2
|
#include <ruby/ruby.h>
|
3
|
+
#include <ruby/version.h>
|
3
4
|
|
4
5
|
void rb_objspace_each_objects(
|
5
6
|
int (*callback)(void *start, void *end, size_t stride, void *data),
|
@@ -26,9 +27,6 @@ countup(VALUE h, VALUE k, int n)
|
|
26
27
|
rb_hash_aset(h, k, cn);
|
27
28
|
}
|
28
29
|
|
29
|
-
static int
|
30
|
-
msize(VALUE klass)
|
31
|
-
{
|
32
30
|
#if RUBY_API_VERSION_MAJOR == 2 && (RUBY_API_VERSION_MINOR == 2 || RUBY_API_VERSION_MINOR == 1)
|
33
31
|
struct method_table_wrapper {
|
34
32
|
st_table *tbl;
|
@@ -40,6 +38,9 @@ struct method_table_wrapper {
|
|
40
38
|
#define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
41
39
|
#endif
|
42
40
|
|
41
|
+
static int
|
42
|
+
msize(VALUE klass)
|
43
|
+
{
|
43
44
|
if (RCLASS_M_TBL(klass)) {
|
44
45
|
return RCLASS_M_TBL(klass)->num_entries;
|
45
46
|
}
|
data/lib/class_stat/version.rb
CHANGED