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 +4 -4
- data/ext/fiddle/memory_view.c +4 -4
- data/ext/fiddle/pointer.c +3 -3
- data/lib/fiddle/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c38a3ad33297e304e12b74e0211d00a162ee82c7178e215ae93a9e2acf680365
|
4
|
+
data.tar.gz: 90de39682e0b7e088ae9a7570da2635e06c90b0eef90f3f060730bc7aed9b31c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b14afde84eb5dc8330ff3a394ab1049b848dc57ba8ad41563348b89338825869a9ec2c8ca5b4a657d094f2bda580e7e351fcb15e58578945726cad6a21717a3
|
7
|
+
data.tar.gz: 4540fa620b2cce64fb1dd887512df98de2b277ad76476fd54396a8fe7583bcb2b5213b3cfed4868a61769b3813033f3ed72efbe3edd9c7b65ec6fc81e1f896f7
|
data/ext/fiddle/memory_view.c
CHANGED
@@ -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.
|
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
|
-
|
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.
|
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, "
|
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);
|
data/ext/fiddle/pointer.c
CHANGED
@@ -102,19 +102,19 @@ fiddle_ptr_check_memory_view(VALUE obj)
|
|
102
102
|
return data;
|
103
103
|
}
|
104
104
|
|
105
|
-
static
|
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
|
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
|
117
|
+
return true;
|
118
118
|
}
|
119
119
|
|
120
120
|
static const rb_memory_view_entry_t fiddle_ptr_memory_view_entry = {
|
data/lib/fiddle/version.rb
CHANGED
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.
|
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-
|
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.
|
121
|
+
rubygems_version: 3.2.2
|
122
122
|
signing_key:
|
123
123
|
specification_version: 4
|
124
124
|
summary: A libffi wrapper for Ruby.
|