rcstorable 0.2.4 → 0.3.0
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/VERSION +1 -1
- data/ext/Makefile +16 -16
- data/ext/rcstorable.bundle +0 -0
- data/ext/rcstorable.c +9 -3
- data/ext/rcstorable.o +0 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.3.0
|
data/ext/Makefile
CHANGED
@@ -4,23 +4,23 @@ SHELL = /bin/sh
|
|
4
4
|
#### Start of system configuration section. ####
|
5
5
|
|
6
6
|
srcdir = .
|
7
|
-
topdir = /
|
7
|
+
topdir = /Users/blibbey/.rvm/rubies/ruby-1.8.7-p248/lib/ruby/1.8/i686-darwin10.2.0
|
8
8
|
hdrdir = $(topdir)
|
9
9
|
VPATH = $(srcdir):$(topdir):$(hdrdir)
|
10
10
|
exec_prefix = $(prefix)
|
11
|
-
prefix = $(DESTDIR)/
|
11
|
+
prefix = $(DESTDIR)/Users/blibbey/.rvm/rubies/ruby-1.8.7-p248
|
12
12
|
sharedstatedir = $(prefix)/com
|
13
|
-
mandir = $(
|
13
|
+
mandir = $(datarootdir)/man
|
14
14
|
psdir = $(docdir)
|
15
15
|
oldincludedir = $(DESTDIR)/usr/include
|
16
16
|
localedir = $(datarootdir)/locale
|
17
17
|
bindir = $(exec_prefix)/bin
|
18
18
|
libexecdir = $(exec_prefix)/libexec
|
19
|
-
sitedir = $(
|
19
|
+
sitedir = $(libdir)/ruby/site_ruby
|
20
20
|
htmldir = $(docdir)
|
21
21
|
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
22
22
|
includedir = $(prefix)/include
|
23
|
-
infodir = $(
|
23
|
+
infodir = $(datarootdir)/info
|
24
24
|
vendorlibdir = $(vendordir)/$(ruby_version)
|
25
25
|
sysconfdir = $(prefix)/etc
|
26
26
|
libdir = $(exec_prefix)/lib
|
@@ -38,31 +38,31 @@ localstatedir = $(prefix)/var
|
|
38
38
|
sitelibdir = $(sitedir)/$(ruby_version)
|
39
39
|
|
40
40
|
CC = gcc
|
41
|
-
LIBRUBY = $(
|
41
|
+
LIBRUBY = $(LIBRUBY_A)
|
42
42
|
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
43
|
-
LIBRUBYARG_SHARED =
|
44
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)
|
43
|
+
LIBRUBYARG_SHARED =
|
44
|
+
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static
|
45
45
|
|
46
46
|
RUBY_EXTCONF_H =
|
47
|
-
CFLAGS = -fno-common -
|
47
|
+
CFLAGS = -fno-common -g -O2 -pipe -fno-common $(cflags)
|
48
48
|
INCFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir)
|
49
49
|
DEFS =
|
50
50
|
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE $(DEFS) $(cppflags)
|
51
51
|
CXXFLAGS = $(CFLAGS)
|
52
|
-
ldflags = -L.
|
52
|
+
ldflags = -L.
|
53
53
|
dldflags =
|
54
54
|
archflag =
|
55
55
|
DLDFLAGS = $(ldflags) $(dldflags) $(archflag)
|
56
|
-
LDSHARED = cc -
|
56
|
+
LDSHARED = cc -dynamic -bundle -undefined suppress -flat_namespace
|
57
57
|
AR = ar
|
58
58
|
EXEEXT =
|
59
59
|
|
60
60
|
RUBY_INSTALL_NAME = ruby
|
61
61
|
RUBY_SO_NAME = ruby
|
62
|
-
arch =
|
63
|
-
sitearch =
|
62
|
+
arch = i686-darwin10.2.0
|
63
|
+
sitearch = i686-darwin10.2.0
|
64
64
|
ruby_version = 1.8
|
65
|
-
ruby = /
|
65
|
+
ruby = /Users/blibbey/.rvm/rubies/ruby-1.8.7-p248/bin/ruby
|
66
66
|
RUBY = $(ruby)
|
67
67
|
RM = rm -f
|
68
68
|
MAKEDIRS = mkdir -p
|
@@ -86,7 +86,7 @@ extout =
|
|
86
86
|
extout_prefix =
|
87
87
|
target_prefix =
|
88
88
|
LOCAL_LIBS =
|
89
|
-
LIBS =
|
89
|
+
LIBS = -ldl -lobjc
|
90
90
|
SRCS = rcstorable.c
|
91
91
|
OBJS = rcstorable.o
|
92
92
|
TARGET = rcstorable
|
@@ -148,7 +148,7 @@ site-install-rb: install-rb
|
|
148
148
|
.c.o:
|
149
149
|
$(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) -c $<
|
150
150
|
|
151
|
-
$(DLLIB): $(OBJS)
|
151
|
+
$(DLLIB): $(OBJS) Makefile
|
152
152
|
@-$(RM) $@
|
153
153
|
$(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
154
154
|
|
data/ext/rcstorable.bundle
CHANGED
Binary file
|
data/ext/rcstorable.c
CHANGED
@@ -41,6 +41,8 @@ static uchar *serialized_end;
|
|
41
41
|
VALUE
|
42
42
|
thaw(VALUE self, VALUE str)
|
43
43
|
{
|
44
|
+
if (str == Qnil) return Qnil; // Do something logical with nil.
|
45
|
+
|
44
46
|
Check_Type(str, T_STRING);
|
45
47
|
extern uchar *serialized, *serialized_end;
|
46
48
|
|
@@ -101,7 +103,7 @@ read_object()
|
|
101
103
|
read_n_hash_pairs(object, size);
|
102
104
|
break;
|
103
105
|
case PT_INT32:
|
104
|
-
object = read_32_bit_integer();
|
106
|
+
object = INT2FIX(read_32_bit_integer());
|
105
107
|
break;
|
106
108
|
case PT_ARRAY:
|
107
109
|
object = rb_ary_new();
|
@@ -169,6 +171,8 @@ read_string(bool extended_size)
|
|
169
171
|
extern uchar *serialized;
|
170
172
|
check_pointer(serialized);
|
171
173
|
|
174
|
+
VALUE ret;
|
175
|
+
|
172
176
|
uint32_t size = extended_size ? read_32_bit_integer() : read_compact_size();
|
173
177
|
|
174
178
|
uint32_t actual_size = 0;
|
@@ -184,7 +188,7 @@ read_string(bool extended_size)
|
|
184
188
|
}
|
185
189
|
rem = size;
|
186
190
|
|
187
|
-
uchar *np =
|
191
|
+
uchar *np = malloc(size+1);
|
188
192
|
uchar *cnp = np;
|
189
193
|
|
190
194
|
check_pointer(serialized+rem-1);
|
@@ -195,7 +199,9 @@ read_string(bool extended_size)
|
|
195
199
|
|
196
200
|
*cnp++ = '\0';
|
197
201
|
|
198
|
-
|
202
|
+
ret = rb_str_new(np, size);
|
203
|
+
free(np);
|
204
|
+
return ret;
|
199
205
|
}
|
200
206
|
|
201
207
|
/*
|
data/ext/rcstorable.o
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rcstorable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-20 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|