malloc 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Makefile +1 -1
- data/binary.gemspec +1 -1
- data/ext/malloc.cc +4 -4
- data/lib/malloc_ext.rb +0 -8
- data/source.gemspec +1 -1
- metadata +1 -1
data/Makefile
CHANGED
data/binary.gemspec
CHANGED
data/ext/malloc.cc
CHANGED
@@ -32,13 +32,13 @@ VALUE Malloc::cRubyClass = Qnil;
|
|
32
32
|
VALUE Malloc::init( VALUE rbModule )
|
33
33
|
{
|
34
34
|
cRubyClass = rb_define_class_under( rbModule, "Malloc", rb_cObject );
|
35
|
-
rb_define_singleton_method( cRubyClass, "
|
35
|
+
rb_define_singleton_method( cRubyClass, "orig_new",
|
36
36
|
RUBY_METHOD_FUNC( mallocNew ), 1 );
|
37
|
-
rb_define_method( cRubyClass, "
|
37
|
+
rb_define_method( cRubyClass, "orig_plus",
|
38
38
|
RUBY_METHOD_FUNC( mallocPlus ), 1 );
|
39
|
-
rb_define_method( cRubyClass, "
|
39
|
+
rb_define_method( cRubyClass, "orig_read",
|
40
40
|
RUBY_METHOD_FUNC( mallocRead ), 1 );
|
41
|
-
rb_define_method( cRubyClass, "
|
41
|
+
rb_define_method( cRubyClass, "orig_write",
|
42
42
|
RUBY_METHOD_FUNC( mallocWrite ), 1 );
|
43
43
|
return cRubyClass;
|
44
44
|
}
|
data/lib/malloc_ext.rb
CHANGED
@@ -6,8 +6,6 @@ module Hornetseye
|
|
6
6
|
|
7
7
|
class << self
|
8
8
|
|
9
|
-
alias_method :orig_new, :new
|
10
|
-
|
11
9
|
# Create new Malloc object.
|
12
10
|
#
|
13
11
|
# @param [size] Number of bytes to allocate.
|
@@ -25,8 +23,6 @@ module Hornetseye
|
|
25
23
|
# Number of bytes allocated.
|
26
24
|
attr_reader :size
|
27
25
|
|
28
|
-
alias_method :orig_plus, :+
|
29
|
-
|
30
26
|
# Operator for doing pointer arithmetic.
|
31
27
|
#
|
32
28
|
# @param [offset] Non-negative offset for pointer.
|
@@ -43,8 +39,6 @@ module Hornetseye
|
|
43
39
|
|
44
40
|
private :orig_plus
|
45
41
|
|
46
|
-
alias_method :orig_read, :read
|
47
|
-
|
48
42
|
# Read data from memory.
|
49
43
|
#
|
50
44
|
# @param [length] Number of bytes to read.
|
@@ -57,8 +51,6 @@ module Hornetseye
|
|
57
51
|
|
58
52
|
private :orig_read
|
59
53
|
|
60
|
-
alias_method :orig_write, :write
|
61
|
-
|
62
54
|
# Write data to memory.
|
63
55
|
#
|
64
56
|
# @param [string] A string with the data.
|
data/source.gemspec
CHANGED