Re: regarding the struct by value patch
Jesse Bouwman via Sbcl-devel <[email protected]>
| Newsgroups | gmane.lisp.steel-bank.devel |
|---|---|
| Message-ID | <[email protected]> |
Yes, callbacks were a motivation for the work. For instance, I am able to write: (sb-alien:with-alien-callable ((visitor-fn sb-alien:int ((child (sb-alien:struct cxcursor)) (parent (sb-alien:struct cxcursor)) (client-data sb-alien:system-area-pointer)) (declare (ignore parent client-data)) (handler-case (let ((result (funcall *visitor-callback* child))) (if (integerp result) result +cxchildvisit-continue+)) (error () +cxchildvisit-break+)))) (clang-visitchildren cursor (sb-alien:alien-sap visitor-fn) (sb-sys:int-sap 0))) The unit tests are in the patch, and visible at: https://github.com/jbouwman/sbcl/blob/struct-by-value-final/tests/alien-struct-by-value.impure.lisp#L498-L612 [sbcl/tests/alien-struct-by-value.impure.lisp at struct-by-value-final · jbouwman/sbcl](https://github.com/jbouwman/sbcl/blob/struct-by-value-final/tests/alien-struct-by-value.impure.lisp#L498-L612) [github.com](https://github.com/jbouwman/sbcl/blob/struct-by-value-final/tests/alien-struct-by-value.impure.lisp#L498-L612) [apple-touch-icon-180x180-a80b8e11abe2.png](https://github.com/jbouwman/sbcl/blob/struct-by-value-final/tests/alien-struct-by-value.impure.lisp#L498-L612) > On Jan 13, 2026, at 6:11 PM, Andrew Wolven <[email protected]> wrote: > > Does that include callbacks or just calling out? _______________________________________________ Sbcl-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sbcl-devel