[Openmcl-devel] %put-cstring in bleeding edge

Gary Byers gb at clozure.com
Fri Jul 29 07:05:08 UTC 2005



On Fri, 29 Jul 2005, Matthew Hastie wrote:

> Dudes,
>
> I've just tried to compile UFFI with the bleeding edge tree, and found that 
> it uses %put-cstring, defined in l1-utils.lisp.
> What is the story - is this function going away? Should UFFI use (setf 
> (%getbyte ..)) instead, or is there a better alternative?
>
> Matt Hastie.
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>

There really should be a documented, exported way of doing this.

%GET-CSTRING is documented and exported, and since the lower-level
byte/word/long/etc are all SETFable, it seems consistent to make
that way be:

(SETF (%GET-STRING <ptr>) STRING)

CCL::%PUT-STRING didn't handle non-simple strings.  I'm not sure
if there were any stronger arguments for its removal, but (since I
wasn't aware of the fact that UFFI used it) I wasn't aware of any
argument for keeping it around, either.  (One such argument would
have been the absence of any other reasonable way of doing this.)

I'll add the SETF inverse and make CCL::%PUT-STRING use it.  Thanks.



More information about the Openmcl-devel mailing list