Software /
code /
prosody
Annotate
util/bit53.lua @ 10798:b81f4fd7f21a
mod_admin_telnet: Use tostring as fallback in pretty printing
This has some nice effects such as functions, VirtualHosts and other
things being printed using their `__tostring` metamethod.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 02 May 2020 20:41:35 +0200 |
parent | 10241:48f7cda4174d |
child | 12358:d77d8fba44ad |
rev | line source |
---|---|
10241
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 -- Only the operators needed by net.websocket.frames are provided at this point |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 return { |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 band = function (a, b) return a & b end; |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 bor = function (a, b) return a | b end; |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 bxor = function (a, b) return a ~ b end; |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
6 }; |
48f7cda4174d
util.bitops: Library to find appropriate bitwise library (closes #1395)
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
7 |