(if (alien-null? data)
#f
(let* ((size (C-> args "gdbm_args key dsize"))
- (string (string-allocate size)))
+ (string (make-legacy-string size)))
(c-peek-bytes data 0 size string 0)
string))))
(if (alien-null? data)
#f
(let* ((size (C-> args "gdbm_args content dsize"))
- (string (string-allocate size)))
+ (string (make-legacy-string size)))
(c-peek-bytes data 0 size string 0)
string))))
;;;; String Compiler
(define (re-compile-char char case-fold?)
- (let ((result (string-allocate 2)))
+ (let ((result (make-legacy-string 2)))
(vector-8b-set! result 0 re-code:exact-1)
(string-set! result 1 (if case-fold? (char-upcase char) char))
(make-compiled-regexp result case-fold?)))
(if (fix:zero? n)
(make-compiled-regexp string case-fold?)
(let ((result
- (string-allocate
+ (make-legacy-string
(let ((qr (integer-divide n 255)))
(fix:+ (fix:* 257 (integer-divide-quotient qr))
(let ((r (integer-divide-remainder qr)))
n)))))
(if (zero? n)
string
- (let ((result (string-allocate (+ end n))))
+ (let ((result (make-legacy-string (+ end n))))
(let loop ((start 0) (i 0))
(let ((index
(substring-find-next-char-in-set string start end
(define (intern string)
((ucode-primitive string->symbol)
- (let ((size (string-length string)))
- (let ((result (string-allocate size)))
+ (let ((size ((ucode-primitive string-length) string)))
+ (let ((result ((ucode-primitive string-allocate) size)))
((ucode-primitive substring-move-right!) string 0 size result 0)
((ucode-primitive substring-downcase!) result 0 size)
result))))
(let ((mem (get-clipboard-data CF_TEXT)))
(and (not (= mem 0))
(let* ((maxlen (global-size mem))
- (s (string-allocate maxlen))
+ (s (make-legacy-string maxlen))
(ptr (global-lock mem)))
(copy-memory s ptr maxlen)
(global-unlock mem)