Okay, thank you Matthew. On Thu, Sep 17, 2015 at 10:17 PM, Matthew Flatt <mfl...@cs.utah.edu> wrote:
> At Thu, 17 Sep 2015 21:29:35 +0800, WarGrey Gyoudmon Ju wrote: > > On Wed, Sep 16, 2015 at 7:36 PM, Matthew Flatt <mfl...@cs.utah.edu> > wrote: > > > > > But, also, to use either of those, you need to use "xform" to adjustthe > > > C code for GC, or you need to adjust the C code to cooperate explicitly > > > with the GC using MZ_GC_DECL_REG(), etc. Are you using "xform" already? > > > > > > > > > More generally, this code looks like something that is more easily > > > handled by Racket and `ffi/unsafe`, instead of writing new C code. You > > > still have to be aware of GC issues, but not to the same degree. > > > > > > No, I have not use "xform" yet. This module does work with FFI. It is a > > chance to learn Racket more deeply. > > > > So is explicitly adjust the C code with MZ_GC_DECL_REG() also the right > way > > to work with realloc(3)? > > Sorry that I forgot to answer the part about replacing libssh2's > allocation functions. I don't think that's going to work at all, since > libssh2 doesn't cooperate with the garbage collector. > > (If it were just a matter of having a scheme_realloc(), you could > implement it with scheme_malloc() and memcpy().) > > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.