snow-data 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ext/extconf.rb +3 -0
- data/ext/snow-data/snow-data.c +147 -29
- data/lib/snow-data/c_struct.rb +145 -371
- data/lib/snow-data/c_struct/array_base.rb +164 -0
- data/lib/snow-data/c_struct/struct_base.rb +304 -0
- data/lib/snow-data/memory.rb +14 -4
- data/lib/snow-data/version.rb +1 -1
- metadata +4 -2
data/lib/snow-data/memory.rb
CHANGED
@@ -28,11 +28,21 @@ module Snow ; end
|
|
28
28
|
#
|
29
29
|
class Snow::Memory
|
30
30
|
|
31
|
+
#
|
32
|
+
# Whether or not __alloca__ is available (and ergo any other variant of it).
|
33
|
+
# You may check this instead of calling respond_to? if you wish.
|
34
|
+
#
|
35
|
+
HAS_ALLOCA = self.respond_to?(:__alloca__)
|
36
|
+
|
31
37
|
class <<self
|
32
|
-
alias_method :
|
33
|
-
alias_method :
|
34
|
-
alias_method :
|
35
|
-
alias_method :
|
38
|
+
alias_method :new, :__wrap__
|
39
|
+
alias_method :wrap, :__wrap__
|
40
|
+
alias_method :malloc, :__malloc__
|
41
|
+
alias_method :[], :__malloc__
|
42
|
+
|
43
|
+
if HAS_ALLOCA
|
44
|
+
alias_method :alloca, :__alloca__
|
45
|
+
end
|
36
46
|
end
|
37
47
|
|
38
48
|
|
data/lib/snow-data/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snow-data
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Noel Raymond Cower
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Snow-Data is a gem for allocating memory and working with existing blocks of
|
@@ -24,6 +24,8 @@ extra_rdoc_files:
|
|
24
24
|
- README.md
|
25
25
|
- COPYING
|
26
26
|
files:
|
27
|
+
- lib/snow-data/c_struct/array_base.rb
|
28
|
+
- lib/snow-data/c_struct/struct_base.rb
|
27
29
|
- lib/snow-data/c_struct.rb
|
28
30
|
- lib/snow-data/memory.rb
|
29
31
|
- lib/snow-data/version.rb
|