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-destructors
] [
drop pq-get-is-null nip [ f ] [ B{ } clone ] if
drop pq-get-is-null nip f B{ } ?
] if ;
: postgresql-column-typed ( handle row column type -- obj )

View File

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

View File

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