From: Sam S. <sd...@gn...> - 2002-04-16 14:33:45
|
> * In message <DFD875E85664D3118FA6080006277DE7055A053F@U8PN2.blf01.telekom.de> > * On the subject of "[clisp-list] regexp-exec filters too much" > * Sent on Mon, 15 Apr 2002 09:57:16 +0200 > * Honorable "Hoehle, Joerg-Cyril" <Joe...@t-...> writes: > > Sam wrote: > > > I don't know if variable size arrays will ever be > > > implemented for the FFI. > > I thought you were working on that! > > I'm dreaming of > (def-c-call-out regexec > (:arguments (preg (c-ptr regex_t)) > (string c-string) > (nmatch size_t :in) > (pmatch (c-ptr (c-array regmatch_t ,is_len(nmatch))) :out :alloca) > (eflags int)) > (:return-type int)) > but this is not yet within reach. > It's also broken (cf. my FFI-limits text). My current thoughts are along: comma outside of backquote! > (def-c-call-out regexec > (:arguments (preg (c-ptr regex_t)) > (string c-string) > (nmatch size_t :in) > (pmatch (c-ptr (c-array regmatch_t ,is_len(nmatch))) :out :alloca > :guard (zerop result)) > (eflags int)) > (:return-type int)) > I.e. the array is only returned when the function call returns success. just allow (pmatch (c-ptr-null (c-array regmatch_t is_len(nmatch))) :out :alloca) and you don't need to guard! (just return NIL!) -- Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/> <http://www.palestine-central.com/> <http://www.mideasttruth.com/> Cannot handle the fatal error due to a fatal error in the fatal error handler. |