20 Commits

Author SHA1 Message Date
Dirkjan Bussink
bf18e04134 Detect whether st.h is present and don't use RUBY_VM as the condition 2012-03-17 12:43:26 +01:00
Dirkjan Bussink
4a0d7f18fd Explicitly state msgpack doesn't modify char* buffers from RSTRING_PTR
From what I could investigate, msgpack doesn't modify char* buffers
obtained from RSTRING_PTR. This means that on Rubinius we don't have to
copy back and forth the buffer to make sure it's also updated on the
Ruby side.

This copying of buffers is a similar problem as the RARRAY_PTR problem,
because it is not safe to expose GC'ed memory on Rubinius to extensions
since it can move due to Rubinius having a moving GC.
2012-03-17 12:40:29 +01:00
Dirkjan Bussink
65c360a2ca Don't use MRI internals in the Ruby extension
Using internals of MRI by using RARRAY_PTR makes it necessary for other
implementations such as Rubinius to continuously copy the structure
returned by RARRAY_PTR back and forth since in Rubinius objects are
layed out differently internally.

Extensions should not depend and use these internal MRI structures if
this is not necessary and when there are API methods that can provide
the same functionality. This makes sure other implementations can also
use the extension without any big problems.

For this reason I also removed the FIXME comment, since that change
would also heavily depend on the internal memory layout of objects on
MRI.
2012-03-17 11:28:19 +01:00
FURUHASHI Sadayuki
bbaf8c2f67 ruby: FIXNUM_P(self) may be false in Fixnum on JRuby 2011-05-09 22:06:12 +09:00
FURUHASHI Sadayuki
f50694cc96 ruby: improves compatibility with JRuby 2011-05-09 21:59:55 +09:00
frsyuki
71a1cb0184 fixes compatibility with Rubinius 2010-08-31 09:29:01 +09:00
frsyuki
09b47cc536 ruby: fixes compatibility with ruby-1.8.5 2010-08-31 07:00:19 +09:00
frsyuki
b5c78de2dd ruby: converts encodings into UTF-8 on Ruby 1.9 2010-08-31 06:30:16 +09:00
frsyuki
dbebe9771b ruby: update rdoc 2010-05-25 02:55:58 +09:00
frsyuki
d0af8aa9f1 ruby: rdoc 2010-05-23 21:10:49 +09:00
frsyuki
a55affe4d5 ruby: add Symbol#to_msgpack 2010-04-17 16:16:56 +09:00
frsyuki
fcce8f6d51 ruby: use 'readpartial' instead of 'sysread' if !io.respond_to?(:sysread) 2010-03-31 12:00:26 +09:00
frsyuki
df5a60fd5b ruby: append_buffer calls "<<" method if the buffer object.class != String 2010-03-26 15:16:13 +09:00
frsyuki
a114f4a5a5 update pack/unpack routines
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@100 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:10:02 +00:00
frsyuki
cd973b8483 integrate machine-dependent integer serialization routine to msgpack/pack_template.h
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@90 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:10:00 +00:00
frsyuki
8f3444c081 ruby binding: fix Fixnum serialization bug on x86_64
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@88 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:10:00 +00:00
frsyuki
1ad04b22d8 lang/c/msgpack: divide pack_raw() into pack_raw() and pack_raw_body()
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@74 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:09:58 +00:00
frsyuki
1222466a1c lang/c/msgpack: c-macro based template
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@66 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:09:57 +00:00
frsyuki
9f460f17d7 lang/c/msgpack: uint64_t, int64_t support for ruby
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@49 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:09:55 +00:00
frsyuki
269cda016d lang/c/msgpack: added Messagepack, a binary-based efficient data interchange format.
git-svn-id: file:///Users/frsyuki/project/msgpack-git/svn/x@48 5a5092ae-2292-43ba-b2d5-dcab9c1a2731
2009-02-15 09:09:55 +00:00