mixico 0.1.3-i386-mswin32 → 0.1.4-i386-mswin32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +5 -2
- data/ext/mixico/compat.h +37 -2
- data/ext/mixico/extconf.rb +0 -3
- data/ext/mixico/mixico.c +1 -22
- data/lib/1.8/mixico.so +0 -0
- data/lib/1.9/mixico.so +0 -0
- data/lib/mixico.rb +4 -0
- data/lib/mixico/version.rb +1 -1
- metadata +3 -3
data/README
CHANGED
@@ -7,13 +7,16 @@ have to really read this once.
|
|
7
7
|
|
8
8
|
% installation %
|
9
9
|
with gem:
|
10
|
-
$ gem install mixico
|
10
|
+
$ gem install mixico
|
11
11
|
|
12
12
|
without:
|
13
13
|
$ ruby setup.rb config
|
14
14
|
$ ruby setup.rb setup
|
15
15
|
$ sudo ruby setup.rb install
|
16
16
|
|
17
|
+
% documentation %
|
18
|
+
http://rubydoc.info/github/rkh/mixico/master/file/README
|
19
|
+
|
17
20
|
% source code %
|
18
21
|
mixico is written in c. it is very quick (basically atomic.)
|
19
22
|
|
@@ -175,5 +178,5 @@ no sign of the mixin at all.
|
|
175
178
|
Until _why might reappear someday, this project is maintained by Konstantin Haase (rkh).
|
176
179
|
konstantin.mailinglists <at> googlemail <dot> com
|
177
180
|
http://github.com/rkh/mixico
|
178
|
-
* updated for Ruby 1.9 by banisterfiend
|
181
|
+
* updated for Ruby 1.9 + other changes by banisterfiend
|
179
182
|
http://github.com/banister
|
data/ext/mixico/compat.h
CHANGED
@@ -5,17 +5,52 @@
|
|
5
5
|
|
6
6
|
#include <ruby.h>
|
7
7
|
|
8
|
+
/* test for 1.9 */
|
9
|
+
#if !defined(RUBY_19) && defined(ROBJECT_EMBED_LEN_MAX)
|
10
|
+
# define RUBY_19
|
11
|
+
#endif
|
12
|
+
|
8
13
|
/* macros for backwards compatibility with 1.8 */
|
9
14
|
#ifndef RUBY_19
|
10
15
|
# define RCLASS_M_TBL(c) (RCLASS(c)->m_tbl)
|
11
16
|
# define RCLASS_SUPER(c) (RCLASS(c)->super)
|
12
17
|
# define RCLASS_IV_TBL(c) (RCLASS(c)->iv_tbl)
|
13
18
|
# define OBJ_UNTRUSTED OBJ_TAINTED
|
14
|
-
# define FALSE 0
|
15
|
-
# define TRUE 1
|
16
19
|
# include "st.h"
|
17
20
|
#endif
|
18
21
|
|
22
|
+
#ifdef RUBY_19
|
23
|
+
inline static VALUE
|
24
|
+
class_alloc(VALUE flags, VALUE klass)
|
25
|
+
{
|
26
|
+
rb_classext_t *ext = ALLOC(rb_classext_t);
|
27
|
+
NEWOBJ(obj, struct RClass);
|
28
|
+
OBJSETUP(obj, klass, flags);
|
29
|
+
obj->ptr = ext;
|
30
|
+
RCLASS_IV_TBL(obj) = 0;
|
31
|
+
RCLASS_M_TBL(obj) = 0;
|
32
|
+
RCLASS_SUPER(obj) = 0;
|
33
|
+
RCLASS_IV_INDEX_TBL(obj) = 0;
|
34
|
+
return (VALUE)obj;
|
35
|
+
}
|
36
|
+
#endif
|
37
|
+
|
38
|
+
inline static VALUE
|
39
|
+
create_class(VALUE flags, VALUE klass)
|
40
|
+
{
|
41
|
+
#ifdef RUBY_19
|
42
|
+
VALUE new_klass = class_alloc(flags, klass);
|
43
|
+
#else
|
44
|
+
NEWOBJ(new_klass, struct RClass);
|
45
|
+
OBJSETUP(new_klass, klass, flags);
|
46
|
+
#endif
|
47
|
+
|
48
|
+
return (VALUE)new_klass;
|
49
|
+
}
|
50
|
+
|
51
|
+
# define FALSE 0
|
52
|
+
# define TRUE 1
|
53
|
+
|
19
54
|
/* a useful macro. cannot use ordinary CLASS_OF as it does not return an lvalue */
|
20
55
|
#define KLASS_OF(c) (RBASIC(c)->klass)
|
21
56
|
|
data/ext/mixico/extconf.rb
CHANGED
data/ext/mixico/mixico.c
CHANGED
@@ -9,22 +9,6 @@
|
|
9
9
|
|
10
10
|
static VALUE mixin_eval, mixout_eval;
|
11
11
|
|
12
|
-
#ifdef RUBY_19
|
13
|
-
static VALUE
|
14
|
-
class_alloc(VALUE flags, VALUE klass)
|
15
|
-
{
|
16
|
-
rb_classext_t *ext = ALLOC(rb_classext_t);
|
17
|
-
NEWOBJ(obj, struct RClass);
|
18
|
-
OBJSETUP(obj, klass, flags);
|
19
|
-
obj->ptr = ext;
|
20
|
-
RCLASS_IV_TBL(obj) = 0;
|
21
|
-
RCLASS_M_TBL(obj) = 0;
|
22
|
-
RCLASS_SUPER(obj) = 0;
|
23
|
-
RCLASS_IV_INDEX_TBL(obj) = 0;
|
24
|
-
return (VALUE)obj;
|
25
|
-
}
|
26
|
-
#endif
|
27
|
-
|
28
12
|
static VALUE
|
29
13
|
rb_mod_disable_mixin(VALUE module, VALUE super)
|
30
14
|
{
|
@@ -66,13 +50,8 @@ static VALUE
|
|
66
50
|
rb_mod_mixin_object(VALUE target, VALUE obj)
|
67
51
|
{
|
68
52
|
VALUE singleton = rb_singleton_class(obj);
|
53
|
+
VALUE iclass = create_class(T_ICLASS, rb_cClass);
|
69
54
|
|
70
|
-
#ifdef RUBY_19
|
71
|
-
VALUE iclass = class_alloc(T_ICLASS, rb_cClass);
|
72
|
-
#else
|
73
|
-
NEWOBJ(iclass, struct RClass);
|
74
|
-
OBJSETUP(iclass, rb_cClass, T_ICLASS);
|
75
|
-
#endif
|
76
55
|
Check_Type(target, T_MODULE);
|
77
56
|
if (!RCLASS_IV_TBL(obj))
|
78
57
|
RCLASS_IV_TBL(obj) = st_init_numtable();
|
data/lib/1.8/mixico.so
CHANGED
Binary file
|
data/lib/1.9/mixico.so
CHANGED
Binary file
|
data/lib/mixico.rb
CHANGED
data/lib/mixico/version.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
10
10
|
platform: i386-mswin32
|
11
11
|
authors:
|
12
12
|
- why the lucky stiff
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-30 00:00:00 +13:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|