summaryrefslogtreecommitdiff
path: root/ext/dl/Changes
blob: d02dd9ed4256fa4aa309b3ae15ca087fe5188314 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
1.0.2 -> 1.1.0
---------------
* Use inline assembler for gcc on ix86 as a default.
* Add DL::Importable module (defined in "dl/import.rb").

1.0.1 -> 1.0.2
--------------
* Fix an installation problem, thanks to Nakada.
* Handle#to_i, to_ptr is added.
* lib/dl/win32.rb is added for Win32API compatibility.

1.0 -> 1.0.1
-------------
* Fix PtrData#to_s.
* Add PtrData#to_str(size).

0.9 -> 1.0 (stable)
-------------------
* PtrData object keeps size data if possible.
* PtrData#size is added.
* LoadLibary(), FreeLibrary() and GetProcAddress() are used on
  windows instead of dlopen(),dlclose() and dlsym().

0.8.1 -> 0.9
------------
* You can use inline assembler to constracting the function calls by
  building the library using --with-asm options for extconf.rb.
  But now this can work with GNU assembler on i386 machines. If you try
  this mechanism, you can get rid of the limit of number of parameters.

0.8 -> 0.8.1
-------------
* rb_dlsym_call() calls xmalloc() or dlmalloc() instread of
  alloca() because of portability.

* 'h2rb' get to parse the enumeration type.

0.7.1 -> 0.8
-------------
* If <type> of Symbol.new(addr, name = nil, type = nil) is nil,
  it returns a DataPtr object.

* PtrData#[] returns the memory image, and PtrData#[]= is used
  to copy the memory image to specified area.

* Handle#sym(symbol_name) returns a PtrData object, and
  Handle#sym(symbol_name, type_spec) returns a Symbol object.

* We can use the number following a type specifier to represent the
  length of an array. For example, if you'd like to represent the
  following structure, we use 'C1024I' when using PtrData#struct! or
  PtrData#union!.

    struct {
      char name[1024];
      int  age;
    }

0.6 -> 0.7
-----------
* type `ANY_FUNC' is removed, it is because the method for
  calling the function obtained by dlsym() was changed.

* `char', `short' and `float' types are supported, if you'd
  like to use those type exactly and run extconf.rb with the
  option `--with-type-{char,short,float}'.

* `DL.sizeof(type)' returns the size of the <type> with the
  alignment. so `DL.sizeof("C") + DL.sizeof("L")' is not equal
  to `DL.sizeof("CL")'. it is assumed that the latter returns
  the enough size for the following structure:
    struct foo { char x; long y; }
  but it may not equal to `sizeof(struct foo)' of C.

* new methods:
  - PtrData#define_data_type
  - PtrData#struct!
  - PtrData#union!
  - PtrData#data_type
  - PtrData#[]
  - PtrData#[]=
  - Symbol.new

0.5 -> 0.6
-----------
* DL.set_callback is changed.
  - set_callback(type,num,proc)   [old style]
  - set_callback(type,num){...}   [new style]

* the handle object don't call dlclose() at the time of GC.
  if you need to call dlclose(), use Handle#enable_close.

* new methods:
  - PtrData#{+,-}
  - PtrData#{+@,-@} (= PtrData#{ptr,ref})
  - DL.malloc
  - DL.strdup
  - MemorySpace.each

* some memory leaks are fixed.

0.4 -> 0.5
----------
* new methods:
  - DL.dlopen (= DL::Handle.new)
  - PtrData#ref
  - PtrData#==
  - PtrData#eql?
  - String#to_ptr
  - Handle#enable_close
  - Handle#disable_close

* PtrData#ptr returns the pointed value (*ptr).

* PtrData#ref returns the reference (&ptr).
  `ptr.ref.ptr == ptr' must be true.

(experiment)
* the callback function is supported.

* new methods:
  - DL.set_callback
  - DL.get_callback


0.3 -> 0.4
----------
* Symbol#call supports the mechanism for converting any object
  to PtrData object automatically using 'to_ptr' method, if the
  argument type is 'P' or 'p'.

* new methods are added.
  - Array#to_ptr
  - IO#to_ptr
  - Symbol#to_ptr
  - Symbol#[]

* new constant is added.
  - DL::FREE is a symbol object for representing the function 'free'.

* the specification of PtrData#free was changed.

* new internal functions are added.
  - rb_dlptr2cptr()
  - rb_dlsym2csym()
  - rb_dlsym_new()

* 'dl.h' is new file.

* 'extconf.rb' and 'depend' ware modified so that we can build
  the library in a directory except 'srcdir' (by N. Nakada).

* (experimental) 'h2rb' is a new script which converts C header
  files into ruby scripts.

0.2 -> 0.3
----------
* many useful functions ware added (by Akinori Musha).

* the type of 'long' was supported (by Akinori Musha).

* some methods of the PtrData ware added for handling pointer data.

* bug fix for mutable int and long.

* the type of array was supported.