malloc 1.3.5 → 1.3.6

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.
Files changed (4) hide show
  1. data/README.md +35 -0
  2. data/Rakefile +1 -1
  3. data/lib/malloc_ext.rb +2 -16
  4. metadata +3 -3
data/README.md CHANGED
@@ -1,4 +1,39 @@
1
1
  malloc
2
2
  ======
3
+
4
+ **Author**: Jan Wedekind
5
+ **Copyright**: 2010
6
+ **License**: GPL
7
+
8
+ Synopsis
9
+ --------
10
+
3
11
  This Ruby extension defines the class {Hornetseye::Malloc}. {Hornetseye::Malloc.new} allows you to allocate memory, using {Hornetseye::Malloc#+} one can do pointer manipulation, and {Hornetseye::Malloc#read} and {Hornetseye::Malloc#write} provide reading Ruby strings from memory and writing Ruby strings to memory.
4
12
 
13
+ Installation
14
+ ------------
15
+
16
+ To install this Ruby extension, use the following command:
17
+
18
+ $ sudo gem install hornetseye-alsa
19
+
20
+ Alternatively you can build and install the Ruby extension from source as follows:
21
+
22
+ $ rake
23
+ $ sudo rake install
24
+
25
+ Usage
26
+ -----
27
+
28
+ Simply run Interactive Ruby:
29
+
30
+ $ irb
31
+
32
+ You can load the Ruby extension like this:
33
+
34
+ require 'rubygems'
35
+ require 'malloc'
36
+ include Hornetseye
37
+
38
+ See documentation of {Hornetseye::Malloc} on how to use this Ruby extension.
39
+
data/Rakefile CHANGED
@@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
7
7
  require 'rbconfig'
8
8
 
9
9
  PKG_NAME = 'malloc'
10
- PKG_VERSION = '1.3.5'
10
+ PKG_VERSION = '1.3.6'
11
11
  CFG = RbConfig::CONFIG
12
12
  CXX = ENV[ 'CXX' ] || 'g++'
13
13
  RB_FILES = FileList[ 'lib/**/*.rb' ]
@@ -45,8 +45,6 @@ module Hornetseye
45
45
  # Allocate the specified number of bytes of raw memory.
46
46
  #
47
47
  # @example Allocate raw memory
48
- # require 'malloc'
49
- # include Hornetseye
50
48
  # m = Malloc.new 32
51
49
  # # Malloc(32)
52
50
  #
@@ -67,8 +65,6 @@ module Hornetseye
67
65
  # Number of bytes allocated
68
66
  #
69
67
  # @example Querying size of allocated memory
70
- # require 'malloc'
71
- # include Hornetseye
72
68
  # m = Malloc.new 32
73
69
  # m.size
74
70
  # # 32
@@ -81,8 +77,7 @@ module Hornetseye
81
77
  # Display information about this object
82
78
  #
83
79
  # @example Displaying information about a Malloc object
84
- # require 'malloc'
85
- # Hornetseye::Malloc.new( 8 ).inspect
80
+ # Malloc.new( 8 ).inspect
86
81
  # "Malloc(8)"
87
82
  #
88
83
  # @return [String] A string with information about this object.
@@ -110,8 +105,7 @@ module Hornetseye
110
105
  # Display information about this object
111
106
  #
112
107
  # @example Displaying information about a Malloc object
113
- # require 'malloc'
114
- # Hornetseye::Malloc.new( 8 ).to_s
108
+ # Malloc.new( 8 ).to_s
115
109
  # "Malloc(8)"
116
110
  #
117
111
  # @return [String] A string with information about this object.
@@ -122,8 +116,6 @@ module Hornetseye
122
116
  # Operator for doing pointer arithmetic
123
117
  #
124
118
  # @example Pointer arithmetic
125
- # require 'malloc'
126
- # include Hornetseye
127
119
  # m = Malloc.new 4
128
120
  # # Malloc(4)
129
121
  # m.write 'abcd'
@@ -149,8 +141,6 @@ module Hornetseye
149
141
  # Read data from memory
150
142
  #
151
143
  # @example Reading and writing data
152
- # require 'malloc'
153
- # include Hornetseye
154
144
  # m = Malloc.new 4
155
145
  # # Malloc(4)
156
146
  # m.write 'abcd'
@@ -173,8 +163,6 @@ module Hornetseye
173
163
  # Write data to memory
174
164
  #
175
165
  # @example Reading and writing data
176
- # require 'malloc'
177
- # include Hornetseye
178
166
  # m = Malloc.new 4
179
167
  # # Malloc(4)
180
168
  # m.write 'abcd'
@@ -208,8 +196,6 @@ module Hornetseye
208
196
  # Shortcut for instantiating Malloc object
209
197
  #
210
198
  # @example Create malloc object
211
- # require 'malloc'
212
- # include Hornetseye
213
199
  # m = Malloc 4
214
200
  # # Malloc(4)
215
201
  #
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 3
8
- - 5
9
- version: 1.3.5
8
+ - 6
9
+ version: 1.3.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jan Wedekind
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-11-17 00:00:00 +00:00
17
+ date: 2010-11-18 00:00:00 +00:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency