From: Christophe R. <cs...@ca...> - 2010-04-10 16:54:03
|
Waldek Hebisch <he...@ma...> writes: > I tried: > > (defun ttt (x) > (sb-sys:with-pinned-objects (x) > (SB-ALIEN::alien-funcall > (SB-ALIEN::extern-alien "ppp" > (SB-ALIEN::function SB-ALIEN::void t)) > x))) Try (defun ttt (x) (sb-sys:with-pinned-objects (x) (let* ((addr (sb-kernel:get-lisp-obj-address x)) (sap (sb-sys:int-sap addr))) (sb-alien:alien-funcall (sb-alien:extern-alien "ppp" (sb-alien:function sb-alien:void (* t))) sap)))) The pointer that the C side will receive will still have its lisp tag on. Cheers, Christophe |