/[guile]/guile/guile-core/devel/policy/api.text
ViewVC logotype

Diff of /guile/guile-core/devel/policy/api.text

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by ela, Sat Dec 8 12:50:37 2001 UTC revision 1.3 by ttn, Thu Feb 28 05:09:19 2002 UTC
# Line 41  Starting w/ guile-1.7.x, in concurrence Line 41  Starting w/ guile-1.7.x, in concurrence
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    
# Line 86  strings into that table you would have t Line 97  strings into that table you would have t
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]
# Line 115  SCM_API scm_t_free_func scm_c_free; Line 126  SCM_API scm_t_free_func scm_c_free;
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:
# Line 129  then.  Basically this can be achieved in Line 140  then.  Basically this can be achieved in
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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26