[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lisp strings to str255
- To: sdobbs@trivia.coginst.uwf.edu (Steven Dobbs)
- Subject: Re: lisp strings to str255
- From: bill@cambridge.apple.com (Bill St. Clair)
- Date: Mon, 24 Feb 1992 20:28:32 -0500
- Cc: info-mcl
>Is there a function in MCL that will convert a string to a str255, or
>should I just write my own?
The WITH-PSTRS macro usually suffices.
(with-pstrs ((pstr "A string"))
; In the body, PSTR is bound to a stack-allocated
; Pascal string containing "A string".
)
If you need to copy into a Mac heap allocated str255, macro-expanding
a WITH-PSTRS form will reveal an internal function that will do what
you want in this case (officially, I suggest that you don't use unexported
functions).