I am watching these patches with great interest. They are surprisingly
small, nice and comprehensible :)

I think this is a really nice foreign-type extension! And it's
backward-compatible, right?

(let ((str "xBC"))
  ((foreign-lambda* c-string (((scheme-pointer unsigned-char) x)) "x[0] =
65; return(x);")
   str)
  (print str))

which produces

unsigned C_char *x=(unsigned C_char *)C_data_pointer_or_null(C_a0);
x[0] = 65; return(x);

which prints

ABC

I'm happy and would love to see this committed somewhere :)
K.



On Fri, Jun 27, 2014 at 10:56 PM, Felix Winkelmann <
felix.winkelm...@bevuta.com> wrote:

> From: Kristian Lein-Mathisen <krist...@adellica.com>
> Subject: Re: [Chicken-hackers] incorrect warning during compilation
> Date: Fri, 27 Jun 2014 17:13:21 +0200
>
> > Actually, that's really cool! A "string-buffer" type! I wouldn't mind
> > seeing this in core. So how does this work, Felix, do we vote and things?
>
> Here is an attempt at Moritzens proposal.
>
>
> felix
>
_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to