rice 1.6.3 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4360dde3fe16791058dff62fd81809f0daa0cde
4
- data.tar.gz: 8ea71ea6558bb9a30fe6b15a89743cf26d4c3774
3
+ metadata.gz: d9e3777fb35b3ff2463c30d6ec4d799ca47dcc69
4
+ data.tar.gz: 477180b1c3be9f330c1cf9e8675e8d947d6ed549
5
5
  SHA512:
6
- metadata.gz: 95bc93a747343ab4b2b62fa225d677487fd3c7206adca60d89e4ae64bc85bc6972325c0fad1c980b869d5049a73e900a95e67b607f55e3f7e82b3acb68f6c7f8
7
- data.tar.gz: f09b5d790a7b2612bda7d86a232a3d7108b24e94fac6ba67783e55908a3341cb6dd13826169195bdad6fc662eb34bc659a2e5c976f2b7147b17e1de4b83b9cec
6
+ metadata.gz: 784a3e9d47f1aba190d3e8aa8637d1e681a5344d43834168ad9bee4ee078080dbf6aaffd51eac88579e49bee880261253f19def28d3419056e0976fe3fa00ebf
7
+ data.tar.gz: 86b4ba50634d38e6ab8a0b18a9a9b0ec8bc0d52a0670785b2a9a9f663c7ebde2fe43c057fb6d1e648b880641bc0c1dbb5ef533f225e85182a1204813d2fd7f44
data/Rakefile CHANGED
@@ -1,33 +1,23 @@
1
1
  $: << File.expand_path(File.dirname(__FILE__))
2
2
  require 'rubygems'
3
3
  require 'rubygems/package_task'
4
- require 'rake/contrib/sshpublisher'
5
4
  require 'yaml'
6
5
  require 'ruby/lib/version'
7
6
 
8
- PROJECT_NAME = "rice"
9
- PROJECT_WEB_PATH = "/var/www/gforge-projects/rice"
10
-
11
7
  task :default => :test
12
8
 
13
- desc "Run unit tests"
9
+ desc "Run unit tests"
14
10
  task :test do
15
11
  cd "test" do
16
12
  ruby "test_rice.rb"
17
13
  end
18
14
  end
19
15
 
20
- desc "Build the documentation"
16
+ desc "Build the documentation"
21
17
  task :doc do
22
18
  sh "make doc"
23
19
  end
24
20
 
25
- desc "Upload documentation to the website. Requires rubyforge gem"
26
- task :upload_web => [:doc] do
27
- host = "jameskilton@rubyforge.org"
28
- Rake::SshDirPublisher.new(host, PROJECT_WEB_PATH, "doc/html").upload
29
- end
30
-
31
21
  # Gemspec kept externally
32
22
  eval(File.read("rice.gemspec"))
33
23
  Gem::PackageTask.new($spec) do |pkg|
data/rice/Array.hpp CHANGED
@@ -20,7 +20,7 @@ namespace Rice
20
20
  * \endcode
21
21
  */
22
22
  class Array
23
- : public Builtin_Object<RArray, T_ARRAY>
23
+ : public Builtin_Object<T_ARRAY>
24
24
  {
25
25
  public:
26
26
  //! Construct a new array
data/rice/Array.ipp CHANGED
@@ -5,26 +5,26 @@
5
5
 
6
6
  inline Rice::Array::
7
7
  Array()
8
- : Builtin_Object<RArray, T_ARRAY>(protect(rb_ary_new))
8
+ : Builtin_Object<T_ARRAY>(protect(rb_ary_new))
9
9
  {
10
10
  }
11
11
 
12
12
  inline Rice::Array::
13
13
  Array(Object v)
14
- : Builtin_Object<RArray, T_ARRAY>(v)
14
+ : Builtin_Object<T_ARRAY>(v)
15
15
  {
16
16
  }
17
17
 
18
18
  inline Rice::Array::
19
19
  Array(VALUE v)
20
- : Builtin_Object<RArray, T_ARRAY>(v)
20
+ : Builtin_Object<T_ARRAY>(v)
21
21
  {
22
22
  }
23
23
 
24
24
  template<typename Iter_T>
25
25
  inline Rice::Array::
26
26
  Array(Iter_T it, Iter_T end)
27
- : Builtin_Object<RArray, T_ARRAY>(protect(rb_ary_new))
27
+ : Builtin_Object<T_ARRAY>(protect(rb_ary_new))
28
28
  {
29
29
  for(; it != end; ++it)
30
30
  {
@@ -35,7 +35,7 @@ Array(Iter_T it, Iter_T end)
35
35
  template<typename T, size_t n>
36
36
  inline Rice::Array::
37
37
  Array(T const (& a)[n])
38
- : Builtin_Object<RArray, T_ARRAY>(protect(rb_ary_new))
38
+ : Builtin_Object<T_ARRAY>(protect(rb_ary_new))
39
39
  {
40
40
  for(size_t j = 0; j < n; ++j)
41
41
  {
@@ -19,26 +19,26 @@ namespace detail
19
19
  }
20
20
  }
21
21
 
22
- template<typename T, int Builtin_Type>
23
- inline Builtin_Object<T, Builtin_Type>::
22
+ template<int Builtin_Type>
23
+ inline Builtin_Object<Builtin_Type>::
24
24
  Builtin_Object(Object value)
25
25
  : Object(value)
26
- , obj_((T*)(value.value()))
26
+ , obj_((RObject*)(value.value()))
27
27
  {
28
28
  protect(detail::check_type, value, Builtin_Type);
29
29
  }
30
30
 
31
- template<typename T, int Builtin_Type>
32
- inline Builtin_Object<T, Builtin_Type>::
33
- Builtin_Object(Builtin_Object<T, Builtin_Type> const & other)
31
+ template<int Builtin_Type>
32
+ inline Builtin_Object<Builtin_Type>::
33
+ Builtin_Object(Builtin_Object<Builtin_Type> const & other)
34
34
  : Object(other.value())
35
35
  , obj_(other.obj_)
36
36
  {
37
37
  }
38
38
 
39
- template<typename T, int Builtin_Type>
40
- inline void Builtin_Object<T, Builtin_Type>::
41
- swap(Builtin_Object<T, Builtin_Type> & ref)
39
+ template<int Builtin_Type>
40
+ inline void Builtin_Object<Builtin_Type>::
41
+ swap(Builtin_Object<Builtin_Type> & ref)
42
42
  {
43
43
  std::swap(obj_, ref.obj_);
44
44
  Object::swap(ref);
@@ -14,7 +14,7 @@ namespace Rice
14
14
  * class is a wrapper for those types of objects, primarily useful as a
15
15
  * base class for other wrapper classes like Array and Hash.
16
16
  */
17
- template<typename T, int Builtin_Type>
17
+ template<int Builtin_Type>
18
18
  class Builtin_Object
19
19
  : public Object
20
20
  {
@@ -31,17 +31,17 @@ public:
31
31
  */
32
32
  Builtin_Object(Builtin_Object const & other);
33
33
 
34
- T & operator*() const { return *obj_; } //!< Return a reference to obj_
35
- T * operator->() const { return obj_; } //!< Return a pointer to obj_
36
- T * get() const { return obj_; } //!< Return a pointer to obj_
34
+ RObject & operator*() const { return *obj_; } //!< Return a reference to obj_
35
+ RObject * operator->() const { return obj_; } //!< Return a pointer to obj_
36
+ RObject * get() const { return obj_; } //!< Return a pointer to obj_
37
37
 
38
38
  //! Swap with another builtin object of the same type
39
39
  /*! \param ref the object with which to swap.
40
40
  */
41
- void swap(Builtin_Object<T, Builtin_Type> & ref);
41
+ void swap(Builtin_Object<Builtin_Type> & ref);
42
42
 
43
43
  private:
44
- T * obj_;
44
+ RObject * obj_;
45
45
  };
46
46
 
47
47
  } // namespace Rice
data/rice/Hash.hpp CHANGED
@@ -22,7 +22,7 @@ namespace Rice
22
22
  //! std::cout << String(h[42]) << std::endl;
23
23
  //! \endcode
24
24
  class Hash
25
- : public Builtin_Object<RHash, T_HASH>
25
+ : public Builtin_Object<T_HASH>
26
26
  {
27
27
  public:
28
28
  //! Construct a new hash.
data/rice/Hash.ipp CHANGED
@@ -10,13 +10,13 @@
10
10
 
11
11
  inline Rice::Hash::
12
12
  Hash()
13
- : Builtin_Object<RHash, T_HASH>(protect(rb_hash_new))
13
+ : Builtin_Object<T_HASH>(protect(rb_hash_new))
14
14
  {
15
15
  }
16
16
 
17
17
  inline Rice::Hash::
18
18
  Hash(Object v)
19
- : Builtin_Object<RHash, T_HASH>(v)
19
+ : Builtin_Object<T_HASH>(v)
20
20
  {
21
21
  }
22
22
 
data/rice/String.cpp CHANGED
@@ -13,37 +13,37 @@
13
13
 
14
14
  Rice::String::
15
15
  String()
16
- : Builtin_Object<RString, T_STRING>(protect(rb_str_new2, ""))
16
+ : Builtin_Object<T_STRING>(protect(rb_str_new2, ""))
17
17
  {
18
18
  }
19
19
 
20
20
  Rice::String::
21
21
  String(VALUE v)
22
- : Builtin_Object<RString, T_STRING>(v)
22
+ : Builtin_Object<T_STRING>(v)
23
23
  {
24
24
  }
25
25
 
26
26
  Rice::String::
27
27
  String(Object v)
28
- : Builtin_Object<RString, T_STRING>(v)
28
+ : Builtin_Object<T_STRING>(v)
29
29
  {
30
30
  }
31
31
 
32
32
  Rice::String::
33
33
  String(char const * s)
34
- : Builtin_Object<RString, T_STRING>(protect(rb_str_new2, s))
34
+ : Builtin_Object<T_STRING>(protect(rb_str_new2, s))
35
35
  {
36
36
  }
37
37
 
38
38
  Rice::String::
39
39
  String(std::string const & s)
40
- : Builtin_Object<RString, T_STRING>(protect(rb_str_new, s.data(), s.length()))
40
+ : Builtin_Object<T_STRING>(protect(rb_str_new, s.data(), s.length()))
41
41
  {
42
42
  }
43
43
 
44
44
  Rice::String::
45
45
  String(Identifier id)
46
- : Builtin_Object<RString, T_STRING>(protect(rb_str_new2, id.c_str()))
46
+ : Builtin_Object<T_STRING>(protect(rb_str_new2, id.c_str()))
47
47
  {
48
48
  }
49
49
 
data/rice/String.hpp CHANGED
@@ -21,7 +21,7 @@ namespace Rice
21
21
  * \endcode
22
22
  */
23
23
  class String
24
- : public Builtin_Object<RString, T_STRING>
24
+ : public Builtin_Object<T_STRING>
25
25
  {
26
26
  public:
27
27
  //! Construct a new string.
data/rice/Struct.cpp CHANGED
@@ -88,7 +88,7 @@ Rice::Struct::Instance::
88
88
  Instance(
89
89
  Struct const & type,
90
90
  Array args)
91
- : Builtin_Object<RStruct, T_STRUCT>(type.new_instance(args))
91
+ : Builtin_Object<T_STRUCT>(type.new_instance(args))
92
92
  , type_(type)
93
93
  {
94
94
  }
@@ -97,7 +97,7 @@ Rice::Struct::Instance::
97
97
  Instance(
98
98
  Struct const & type,
99
99
  Object s)
100
- : Builtin_Object<RStruct, T_STRUCT>(s)
100
+ : Builtin_Object<T_STRUCT>(s)
101
101
  , type_(type)
102
102
  {
103
103
  }
@@ -106,7 +106,7 @@ void Rice::Struct::Instance::
106
106
  swap(Instance & other)
107
107
  {
108
108
  type_.swap(other.type_);
109
- Builtin_Object<RStruct, T_STRUCT>::swap(other);
109
+ Builtin_Object<T_STRUCT>::swap(other);
110
110
  }
111
111
 
112
112
  Rice::Struct Rice::
data/rice/Struct.hpp CHANGED
@@ -120,7 +120,7 @@ private:
120
120
  //! An instance of a Struct
121
121
  //! \sa Struct
122
122
  class Struct::Instance
123
- : public Builtin_Object<RStruct, T_STRUCT>
123
+ : public Builtin_Object<T_STRUCT>
124
124
  {
125
125
  public:
126
126
  //! Create a new Instance of a Struct.
@@ -1,6 +1,6 @@
1
1
  #ifndef Rice__detail__ruby_version_code__hpp
2
2
  #define Rice__detail__ruby_version_code__hpp
3
3
 
4
- #define RICE__RUBY_VERSION_CODE 215
4
+ #define RICE__RUBY_VERSION_CODE 220
5
5
 
6
6
  #endif // Rice__detail__ruby_version_code__hpp
data/ruby/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rice
2
- VERSION = "1.6.3"
2
+ VERSION = "1.7.0"
3
3
  end
@@ -15,7 +15,7 @@ TESTCASE(construct_with_object)
15
15
  {
16
16
  Class c(rb_cObject);
17
17
  Object o(c.call("new"));
18
- Builtin_Object<RObject, T_OBJECT> b(o);
18
+ Builtin_Object<T_OBJECT> b(o);
19
19
  ASSERT_EQUAL(o.value(), b.value());
20
20
  ASSERT_EQUAL(T_OBJECT, rb_type(b.value()));
21
21
  ASSERT_EQUAL(rb_cObject, b.class_of().value());
@@ -26,8 +26,8 @@ TESTCASE(copy_construct)
26
26
  {
27
27
  Class c(rb_cObject);
28
28
  Object o(c.call("new"));
29
- Builtin_Object<RObject, T_OBJECT> b(o);
30
- Builtin_Object<RObject, T_OBJECT> b2(b);
29
+ Builtin_Object<T_OBJECT> b(o);
30
+ Builtin_Object<T_OBJECT> b2(b);
31
31
  ASSERT_EQUAL(o.value(), b2.value());
32
32
  ASSERT_EQUAL(T_OBJECT, rb_type(b2.value()));
33
33
  ASSERT_EQUAL(rb_cObject, b2.class_of().value());
@@ -38,7 +38,7 @@ TESTCASE(dereference)
38
38
  {
39
39
  Class c(rb_cObject);
40
40
  Object o(c.call("new"));
41
- Builtin_Object<RObject, T_OBJECT> b(o);
41
+ Builtin_Object<T_OBJECT> b(o);
42
42
  ASSERT_EQUAL(ROBJECT(o.value()), &*b);
43
43
  }
44
44
 
@@ -46,7 +46,7 @@ TESTCASE(arrow)
46
46
  {
47
47
  Class c(rb_cObject);
48
48
  Object o(c.call("new"));
49
- Builtin_Object<RObject, T_OBJECT> b(o);
49
+ Builtin_Object<T_OBJECT> b(o);
50
50
  ASSERT_EQUAL(rb_cObject, b->basic.klass);
51
51
  }
52
52
 
@@ -54,7 +54,7 @@ TESTCASE(get)
54
54
  {
55
55
  Class c(rb_cObject);
56
56
  Object o(c.call("new"));
57
- Builtin_Object<RObject, T_OBJECT> b(o);
57
+ Builtin_Object<T_OBJECT> b(o);
58
58
  ASSERT_EQUAL(ROBJECT(o.value()), b.get());
59
59
  }
60
60
 
@@ -62,9 +62,9 @@ TESTCASE(swap)
62
62
  {
63
63
  Class c(rb_cObject);
64
64
  Object o1(c.call("new"));
65
- Builtin_Object<RObject, T_OBJECT> b1(o1);
65
+ Builtin_Object<T_OBJECT> b1(o1);
66
66
  Object o2(c.call("new"));
67
- Builtin_Object<RObject, T_OBJECT> b2(o2);
67
+ Builtin_Object<T_OBJECT> b2(o2);
68
68
  b1.swap(b2);
69
69
  ASSERT_EQUAL(b1.value(), o2.value());
70
70
  ASSERT_EQUAL(b2.value(), o1.value());
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: 1.6.3
4
+ version: 1.7.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: 2014-12-18 00:00:00.000000000 Z
12
+ date: 2015-01-06 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
@@ -227,7 +227,7 @@ files:
227
227
  - test/test_rice.rb
228
228
  - test/unittest.cpp
229
229
  - test/unittest.hpp
230
- homepage: http://rice.rubyforge.org/
230
+ homepage: https://github.com/jasonroelofs/rice
231
231
  licenses:
232
232
  - MIT
233
233
  metadata: {}
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
246
246
  - !ruby/object:Gem::Version
247
247
  version: '0'
248
248
  requirements: []
249
- rubyforge_project: rice
249
+ rubyforge_project:
250
250
  rubygems_version: 2.4.5
251
251
  signing_key:
252
252
  specification_version: 4