You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/05/30 15:55:24 UTC

[GitHub] [incubator-kvrocks] PragmaTwice commented on pull request #1479: Fix all weird out parameters `int *ret` in the codebase

PragmaTwice commented on PR #1479:
URL: https://github.com/apache/incubator-kvrocks/pull/1479#issuecomment-1568684138

   > > @git-hulk I don't think using `redis::Bool` is appropriate. The meaning of `redis::Integer` function is to return a Integer RESP, not process a Integer. Even though we are passing in a `bool` here, we need to return a Integer RESP, so I think `redis::Integer` function is more appropriate.
   > 
   > @jihuayu We already have `redis::Integer` function now, what I mean is to add redis::Bool based on the Integer function like below:
   > 
   > ```
   > std::string Bool(b bool) {
   >   return redis::Integer(b ? 1 : 0)
   > }
   > ```
   
   I think `Bool` is not concrete here. The returned string is a integer string, like `1`, `0` rather than `true` `false`.
   
   Current solution LGTM.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org