chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] incorrect warning during compilation


From: Kristian Lein-Mathisen
Subject: Re: [Chicken-hackers] incorrect warning during compilation
Date: Tue, 1 Jul 2014 12:07:35 +0200

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 <address@hidden> wrote:
From: Kristian Lein-Mathisen <address@hidden>
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]