(bytevector-u8-set! bytevector i (car bytes)))
bytevector))
+(define (legacy-string->bytevector string)
+ (if (bytevector? string)
+ string
+ (begin
+ (guarantee legacy-string? string 'legacy-string->bytevector)
+ (object-new-type bytevector-type string))))
+
+;;; TODO(cph): eliminate after 9.3 release:
+(define-integrable bytevector-type #x33)
+
(define (bytevector-append . bytevectors)
(let* ((k
(do ((bytevectors bytevectors (cdr bytevectors))
(register-predicate! interned-symbol? 'interned-symbol '<= symbol?)
(register-predicate! keyword? 'keyword '<= symbol?)
(register-predicate! lambda-tag? 'lambda-tag)
+ (register-predicate! legacy-string? 'legacy-string)
(register-predicate! named-structure? 'named-structure)
(register-predicate! population? 'population)
(register-predicate! promise? 'promise)