no need to clone empty byte-array.

char-rename
John Benediktsson 2017-01-22 15:41:07 -08:00
parent f16a7830b1
commit 134be588cf
3 changed files with 3 additions and 3 deletions

View File

@ -148,7 +148,7 @@ M: postgresql-malloc-destructor dispose ( obj -- )
] with-out-parameters memory>byte-array ] with-out-parameters memory>byte-array
] with-destructors ] with-destructors
] [ ] [
drop pq-get-is-null nip [ f ] [ B{ } clone ] if drop pq-get-is-null nip f B{ } ?
] if ; ] if ;
: postgresql-column-typed ( handle row column type -- obj ) : postgresql-column-typed ( handle row column type -- obj )

View File

@ -30,6 +30,6 @@ M: process-state get-checksum
[ out>> dispose ] keep [ out>> dispose ] keep
stream-contents trim-hash hex-string>bytes stream-contents trim-hash hex-string>bytes
] with-disposal ] with-disposal
] [ B{ } clone ] if* ] [ B{ } ] if*
[ >>result ] keep [ >>result ] keep
] unless* nip ; ] unless* nip ;

View File

@ -230,7 +230,7 @@ ERROR: bad-filter n ;
loading-png width>> pass adam7-subimage-width :> width loading-png width>> pass adam7-subimage-width :> width
height width * zero? [ height width * zero? [
B{ } clone B{ }
] [ ] [
byte-reader loading-png width height read-scanlines byte-reader loading-png width height read-scanlines
] if ; ] if ;