Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-24 Thread WarGrey Gyoudmon Ju
Okay, I am here again. No lucky, I cannot make it cooperate with the precision GC, even catching the signal does not work. The `xform` seems buggy in two ways I have encountered: 1. it may eat some module level non-static constants, say, to export `syslog` macros 'facilities', 'severities' and

Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-17 Thread WarGrey Gyoudmon Ju
Okay, thank you Matthew. On Thu, Sep 17, 2015 at 10:17 PM, Matthew Flatt 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 > wrote: > > > > > But, also, to use either of those, you

[racket-users] [racket][FFI] memory management when making io ports in C

2015-09-16 Thread WarGrey Gyoudmon Ju
Hello. foxpipe.c is a wrapper of libssh2 APIs that suitable to work with (sync) and custodian. Everything is okay except that the sigfault annoys me a lot. typedef struct foxpipe_session { LIBSSH2_SESSION *sshclient; Scheme_Input_Port *dev_tcpin; Scheme_Output_Port *dev_tcpout;

Re: [racket-users] [racket][FFI] memory management when making io ports in C

2015-09-16 Thread Matthew Flatt
At Wed, 16 Sep 2015 17:16:50 +0800, WarGrey Gyoudmon Ju wrote: > foxpipe.c is a wrapper of libssh2 APIs that suitable to work with (sync) > and custodian. Everything is okay except that the sigfault annoys me a lot. > > typedef struct foxpipe_session { > > LIBSSH2_SESSION *sshclient; > >