1. 17 Nov, 2015 13 commits
  2. 09 Nov, 2015 1 commit
    • antirez's avatar
      Scripting: fix redis.call() error reporting. · 1b5d24eb
      antirez authored
      Arguments arity and arguments type error of redis.call() were not
      reported correctly to Lua, so the command acted in this regard like
      redis.pcall(), but just for two commands. Redis.call() should always
      raise errors instead.
      1b5d24eb
  3. 05 Nov, 2015 2 commits
  4. 04 Nov, 2015 1 commit
  5. 30 Oct, 2015 6 commits
  6. 01 Oct, 2015 1 commit
  7. 27 Jul, 2015 1 commit
  8. 26 Jul, 2015 6 commits
  9. 16 Jul, 2015 1 commit
  10. 14 Jul, 2015 1 commit
  11. 03 Jun, 2015 1 commit
  12. 22 Mar, 2015 1 commit
  13. 20 Jan, 2015 3 commits
  14. 09 Jan, 2015 1 commit
  15. 09 Oct, 2014 1 commit
    • Matt Stancliff's avatar
      Lua: Add bitop · 3fecb961
      Matt Stancliff authored
      A few people have written custom C commands because bit
      manipulation isn't exposed through Lua.  Let's give
      them Mike Pall's bitop.
      
      This adds bitop 1.0.2 (2012-05-08) from http://bitop.luajit.org/
      
      bitop is imported as "bit" into the global namespace.
      
      New Lua commands: bit.tobit, bit.tohex, bit.bnot, bit.band, bit.bor, bit.bxor,
      bit.lshift, bit.rshift, bit.arshift, bit.rol, bit.ror, bit.bswap
      
      Verification of working (the asserts would abort on error, so (nil) is correct):
      127.0.0.1:6379> eval "assert(bit.tobit(1) == 1); assert(bit.band(1) == 1); assert(bit.bxor(1,2) == 3); assert(bit.bor(1,2,4,8,16,32,64,128) == 255)" 0
      (nil)
      127.0.0.1:6379> eval 'assert(0x7fffffff == 2147483647, "broken hex literals"); assert(0xffffffff == -1 or 0xffffffff == 2^32-1, "broken hex literals"); assert(tostring(-1) == "-1", "broken tostring()"); assert(tostring(0xffffffff) == "-1" or tostring(0xffffffff) == "4294967295", "broken tostring()")' 0
      (nil)
      
      Tests also integrated into the scripting tests and can be run with:
      ./runtest --single unit/scripting
      
      Tests are excerpted from `bittest.lua` included in the bitop distribution.
      3fecb961