fiddle 1.0.5 → 1.0.6

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
  SHA256:
3
- metadata.gz: 5b30cdd829b9c5eac206762f06da0de52256e0a9396bd884464537e284f44858
4
- data.tar.gz: c1f1b7f16a60654b0206a0813ba2925370254d532077a91910b4824944570c25
3
+ metadata.gz: c38a3ad33297e304e12b74e0211d00a162ee82c7178e215ae93a9e2acf680365
4
+ data.tar.gz: 90de39682e0b7e088ae9a7570da2635e06c90b0eef90f3f060730bc7aed9b31c
5
5
  SHA512:
6
- metadata.gz: a5dd2c713590fd46c297995f69890ed443869f764a94d7f3b704816750dc3d811acf4babd571bb18c6d5c293db64520f0c7eefa79510bc35b3696d93ae39a07b
7
- data.tar.gz: 5a983b1229fcf4da70cde21ea0c5919a4ec1bcc4bf75dd5975abab4f88397ff8dfeb26415dd0e0b760709a3cb77103b8bed6615a1726aa9ae46baf238a038932
6
+ metadata.gz: 4b14afde84eb5dc8330ff3a394ab1049b848dc57ba8ad41563348b89338825869a9ec2c8ca5b4a657d094f2bda580e7e351fcb15e58578945726cad6a21717a3
7
+ data.tar.gz: 4540fa620b2cce64fb1dd887512df98de2b277ad76476fd54396a8fe7583bcb2b5213b3cfed4868a61769b3813033f3ed72efbe3edd9c7b65ec6fc81e1f896f7
@@ -48,7 +48,7 @@ static size_t
48
48
  fiddle_memview_memsize(const void *ptr)
49
49
  {
50
50
  const struct memview_data *data = ptr;
51
- return sizeof(*data) + sizeof(rb_memory_view_item_component_t)*data->n_members + (size_t)data->view.len;
51
+ return sizeof(*data) + sizeof(rb_memory_view_item_component_t)*data->n_members + (size_t)data->view.byte_size;
52
52
  }
53
53
 
54
54
  static const rb_data_type_t fiddle_memview_data_type = {
@@ -90,13 +90,13 @@ rb_fiddle_memview_get_obj(VALUE obj)
90
90
  }
91
91
 
92
92
  static VALUE
93
- rb_fiddle_memview_get_length(VALUE obj)
93
+ rb_fiddle_memview_get_byte_size(VALUE obj)
94
94
  {
95
95
  struct memview_data *data;
96
96
  TypedData_Get_Struct(obj, struct memview_data, &fiddle_memview_data_type, data);
97
97
 
98
98
  if (NIL_P(data->view.obj)) return Qnil;
99
- return SSIZET2NUM(data->view.len);
99
+ return SSIZET2NUM(data->view.byte_size);
100
100
  }
101
101
 
102
102
  static VALUE
@@ -240,7 +240,7 @@ Init_fiddle_memory_view(void)
240
240
  rb_define_alloc_func(rb_cMemoryView, rb_fiddle_memview_s_allocate);
241
241
  rb_define_method(rb_cMemoryView, "initialize", rb_fiddle_memview_initialize, 1);
242
242
  rb_define_method(rb_cMemoryView, "obj", rb_fiddle_memview_get_obj, 0);
243
- rb_define_method(rb_cMemoryView, "length", rb_fiddle_memview_get_length, 0);
243
+ rb_define_method(rb_cMemoryView, "byte_size", rb_fiddle_memview_get_byte_size, 0);
244
244
  rb_define_method(rb_cMemoryView, "readonly?", rb_fiddle_memview_get_readonly, 0);
245
245
  rb_define_method(rb_cMemoryView, "format", rb_fiddle_memview_get_format, 0);
246
246
  rb_define_method(rb_cMemoryView, "item_size", rb_fiddle_memview_get_item_size, 0);
@@ -102,19 +102,19 @@ fiddle_ptr_check_memory_view(VALUE obj)
102
102
  return data;
103
103
  }
104
104
 
105
- static int
105
+ static bool
106
106
  fiddle_ptr_memory_view_available_p(VALUE obj)
107
107
  {
108
108
  return fiddle_ptr_check_memory_view(obj) != NULL;
109
109
  }
110
110
 
111
- static int
111
+ static bool
112
112
  fiddle_ptr_get_memory_view(VALUE obj, rb_memory_view_t *view, int flags)
113
113
  {
114
114
  struct ptr_data *data = fiddle_ptr_check_memory_view(obj);
115
115
  rb_memory_view_init_as_byte_array(view, obj, data->ptr, data->size, true);
116
116
 
117
- return 1;
117
+ return true;
118
118
  }
119
119
 
120
120
  static const rb_memory_view_entry_t fiddle_ptr_memory_view_entry = {
@@ -1,3 +1,3 @@
1
1
  module Fiddle
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fiddle
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Patterson
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-21 00:00:00.000000000 Z
12
+ date: 2020-12-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -118,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
118
118
  - !ruby/object:Gem::Version
119
119
  version: '0'
120
120
  requirements: []
121
- rubygems_version: 3.2.0.rc.2
121
+ rubygems_version: 3.2.2
122
122
  signing_key:
123
123
  specification_version: 4
124
124
  summary: A libffi wrapper for Ruby.