41 |
available to usloth windows platforms, the naked library was once again |
available to usloth windows platforms, the naked library was once again |
42 |
dressed w/ the "SCM_API interface". |
dressed w/ the "SCM_API interface". |
43 |
|
|
44 |
|
Here is a table of versions (! means planned): |
45 |
|
|
46 |
|
guile libguile readline qthreads srfi-4 -13-14 |
47 |
|
--------------------------------------------------- |
48 |
|
1.3.4 6.0.0 0.0.0 0.0.0 - - |
49 |
|
1.4 9.0.0 0.0.0 0.0.0 - - |
50 |
|
1.4.1 10.0.0 TBD 15.0.0 - - ! |
51 |
|
1.6.x 15.0.0 10.0.0 15.0.0 1.0.0 1.0.0 ! |
52 |
|
|
53 |
|
Note: These are libtool-style versions: CURRENT:REVISION:AGE |
54 |
|
|
55 |
|
|
56 |
* Decisions |
* Decisions |
57 |
|
|
97 |
corresponding version of 'free' with every string? We should demand such |
corresponding version of 'free' with every string? We should demand such |
98 |
coding from all guile users? |
coding from all guile users? |
99 |
|
|
100 |
The proposal itself read: For a clean memory interface of a client program |
The proposal itself read: For a clean memory interface of a client program |
101 |
to libguile we use the following functions from libguile: |
to libguile we use the following functions from libguile: |
102 |
|
|
103 |
* scm_c_malloc -- should be used to allocate memory returned by some |
* scm_c_malloc -- should be used to allocate memory returned by some |
104 |
of the SCM to C converter functions in libguile if the |
of the SCM to C converter functions in libguile if the |
105 |
client program does not supply memory |
client program does not supply memory |
106 |
* scm_c_free -- must be used by the client program to free the memory |
* scm_c_free -- must be used by the client program to free the memory |
107 |
returned by the SCM to C converter functions in |
returned by the SCM to C converter functions in |
108 |
libguile if the client program did not supply a buffer |
libguile if the client program did not supply a buffer |
109 |
* scm_c_realloc -- to be complete, do not know a real purpose yet |
* scm_c_realloc -- to be complete, do not know a real purpose yet |
110 |
|
|
111 |
|
|
112 |
Yet another proposal regarding this problem reads as follows: We could make |
Yet another proposal regarding this problem reads as follows: We could make |
113 |
life easier, if we supplied the following: |
life easier, if we supplied the following: |
114 |
|
|
115 |
[in gc.h] |
[in gc.h] |
126 |
} |
} |
127 |
|
|
128 |
Then the SCM to C converters allocating memory to store their results use |
Then the SCM to C converters allocating memory to store their results use |
129 |
scm_c_malloc() instead of simply malloc(). This way all libguile/Unix users |
scm_c_malloc() instead of simply malloc(). This way all libguile/Unix users |
130 |
can stick to the previous free() policy, saying that you need to free() |
can stick to the previous free() policy, saying that you need to free() |
131 |
pointers delivered by libguile. On the other hand M$-Windows users can pass |
pointers delivered by libguile. On the other hand M$-Windows users can pass |
132 |
their own malloc()-function-pointer to the library and use their own free() |
their own malloc()-function-pointer to the library and use their own free() |
133 |
then. Basically this can be achieved in the following order: |
then. Basically this can be achieved in the following order: |
140 |
free (str); |
free (str); |
141 |
} |
} |
142 |
|
|
143 |
This policy is still discussed: |
This policy is still discussed: |
144 |
If there is one global variable scm_c_malloc, then setting it within one |
If there is one global variable scm_c_malloc, then setting it within one |
145 |
thread may interfere with another thread that expects scm_c_malloc to be |
thread may interfere with another thread that expects scm_c_malloc to be |
146 |
set differently. In other words, you would have to introduce some locking |
set differently. In other words, you would have to introduce some locking |