rice 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Doxyfile +1 -1
- data/rice/Array.hpp +0 -6
- data/rice/Array.ipp +4 -11
- data/rice/Object.cpp +10 -1
- data/ruby/lib/version.rb +1 -1
- data/test/test_Array.cpp +0 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d302eb67c62576943948c960ff3fbd08b58488cd
|
4
|
+
data.tar.gz: 890eec0ab8be02d12ee4780d284c92c9c3f03a66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 365b2406ce20a999ebc98baa9d1da1847e278928ed498212b9f290e6a400e218b4dbd2f7c0be1da02fb68649e73a3a79d2da8914a39e9e9a5b9bb00b5c6f37ae
|
7
|
+
data.tar.gz: 5de69a6bf6ff0b4771f28c94fd399a141bddbd1a1b253ebede89468d4eb802708379c8c7ab85531d4842cff8c155dfc22856611b7e06c8e59d863bb64c338a47
|
data/Doxyfile
CHANGED
@@ -38,7 +38,7 @@ PROJECT_NAME = "Rice"
|
|
38
38
|
# could be handy for archiving the generated documentation or if some version
|
39
39
|
# control system is used.
|
40
40
|
|
41
|
-
PROJECT_NUMBER = 2.
|
41
|
+
PROJECT_NUMBER = 2.1.0
|
42
42
|
|
43
43
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
44
44
|
# for a project that appears at the top of each page and should give viewer a
|
data/rice/Array.hpp
CHANGED
@@ -99,12 +99,6 @@ public:
|
|
99
99
|
*/
|
100
100
|
Object shift();
|
101
101
|
|
102
|
-
//! Return a pointer to the beginning of the underlying C array.
|
103
|
-
//! Use with caution!
|
104
|
-
/*! \return a pointer to the beginning of the array.
|
105
|
-
*/
|
106
|
-
VALUE * to_c_array();
|
107
|
-
|
108
102
|
private:
|
109
103
|
template<typename Array_Ref_T, typename Value_T>
|
110
104
|
class Iterator;
|
data/rice/Array.ipp
CHANGED
@@ -52,8 +52,7 @@ size() const
|
|
52
52
|
inline Rice::Object Rice::Array::
|
53
53
|
operator[](ptrdiff_t index) const
|
54
54
|
{
|
55
|
-
|
56
|
-
return ptr[position_of(index)];
|
55
|
+
return protect(rb_ary_entry, value(), position_of(index));
|
57
56
|
}
|
58
57
|
|
59
58
|
inline Rice::Array::Proxy Rice::Array::
|
@@ -88,12 +87,6 @@ shift()
|
|
88
87
|
return protect(rb_ary_shift, value());
|
89
88
|
}
|
90
89
|
|
91
|
-
inline VALUE * Rice::Array::
|
92
|
-
to_c_array()
|
93
|
-
{
|
94
|
-
return RARRAY_PTR(this->value());
|
95
|
-
}
|
96
|
-
|
97
90
|
inline size_t Rice::Array::
|
98
91
|
position_of(ptrdiff_t index) const
|
99
92
|
{
|
@@ -117,13 +110,13 @@ Proxy(Array array, size_t index)
|
|
117
110
|
inline Rice::Array::Proxy::
|
118
111
|
operator Rice::Object() const
|
119
112
|
{
|
120
|
-
return
|
113
|
+
return protect(rb_ary_entry, array_.value(), index_);
|
121
114
|
}
|
122
115
|
|
123
116
|
inline VALUE Rice::Array::Proxy::
|
124
117
|
value() const
|
125
118
|
{
|
126
|
-
return
|
119
|
+
return protect(rb_ary_entry, array_.value(), index_);
|
127
120
|
}
|
128
121
|
|
129
122
|
template<typename T>
|
@@ -131,7 +124,7 @@ Rice::Object Rice::Array::Proxy::
|
|
131
124
|
operator=(T const & value)
|
132
125
|
{
|
133
126
|
Object o = to_ruby(value);
|
134
|
-
|
127
|
+
rb_ary_store(array_.value(), index_, o.value());
|
135
128
|
return o;
|
136
129
|
}
|
137
130
|
|
data/rice/Object.cpp
CHANGED
@@ -108,7 +108,16 @@ vcall(
|
|
108
108
|
Identifier id,
|
109
109
|
Array args)
|
110
110
|
{
|
111
|
-
|
111
|
+
std::vector<VALUE> a(args.size());
|
112
|
+
|
113
|
+
Array::const_iterator it = args.begin();
|
114
|
+
Array::const_iterator end = args.end();
|
115
|
+
|
116
|
+
for(int i = 0 ;it != end; i++, ++it) {
|
117
|
+
a[i] = it->value();
|
118
|
+
}
|
119
|
+
|
120
|
+
return protect(rb_funcall3, *this, id, args.size(), &a[0]);
|
112
121
|
}
|
113
122
|
|
114
123
|
void Rice::Object::
|
data/ruby/lib/version.rb
CHANGED
data/test/test_Array.cpp
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Brannan
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: |
|
15
15
|
Rice is a C++ interface to Ruby's C API. It provides a type-safe and
|