Update script.go

OK then. I removed my comments, for bool code should work as is.
This commit is contained in:
Nikolay Turpitko 2016-01-22 16:57:52 +05:00
parent b2f90f832a
commit f08763cf37
1 changed files with 0 additions and 13 deletions

View File

@ -86,23 +86,10 @@ func (w *luaWriter) writeSliceArray(lst [][]byte) {
for i, v := range lst { for i, v := range lst {
if v == nil { if v == nil {
w.l.PushBoolean(false) w.l.PushBoolean(false)
//TNL: not sure what is "expected" behaviour here.
//Redis returns "false", but may be "nil" is more appropriate?
//For me both variants seems better, then empty string.
//
//w.l.PushNil()
} else { } else {
w.l.PushString(hack.String(v)) w.l.PushString(hack.String(v))
} }
w.l.RawSeti(-2, i+1) w.l.RawSeti(-2, i+1)
/*
//TNL: and instead of push nil we can just skip it
if v != nil {
w.l.PushString(hack.String(v))
w.l.RawSeti(-2, i+1)
}
*/
} }
} }