Skip to content

Instantly share code, notes, and snippets.

-- msgpackffi.lua (internal file)
local ffi = require('ffi')
local buffer = require('buffer')
local builtin = ffi.C
local msgpack = require('msgpack') -- .NULL, .array_mt, .map_mt, .cfg
local MAXNESTING = 16
local int8_ptr_t = ffi.typeof('int8_t *')
local uint8_ptr_t = ffi.typeof('uint8_t *')
local uint16_ptr_t = ffi.typeof('uint16_t *')
This file has been truncated, but you can view the full file.
---- TRACE 11 start msgpackffi.lua:527
---- TRACE 11 abort msgpackffi.lua:528 -- error thrown or hook called during recording
---- TRACE 11 start msgpackffi.lua:467
---- TRACE 11 abort msgpackffi.lua:468 -- error thrown or hook called during recording
---- TRACE 11 start msgpackffi.lua:467
0017 GGET 8 3 ; "table"
0018 TGETS 8 8 4 ; "insert"
0019 MOV 9 2
-- wal is off, good opportunity to test something more CPU intensive:
env = require('test_run')
---
...
test_run = env.new()
---
...
spaces = {}
---
...
local x = 0
while x < 1000000000 do
local k, v = math.random(10, 20), math.random(100, 500)
if k < 10 or k > 20 or v < 100 or v > 500 then
print(k, v)
break
end
x = x + 1
end
#!/usr/bin/env tarantool
-- Simple Lint: check for unintended globals
--
-- One can spot all globals by checking the bytecode:
-- search for GSET and GGET instructions. Based on jit/bc.lua
local function is_main()
return debug.getinfo(2).what == "main" and pcall(debug.getlocal, 5, 1) == false
end
@bigbes
bigbes / gist:3808423
Created September 30, 2012 20:54
tarantool_net-split_27445ea5b7eba7b607a2d1c857280f9f4035b589.patch
diff --git a/src/say.m b/src/say.m
index 6d08187..e0012ef 100644
--- a/src/say.m
+++ b/src/say.m
@@ -140,14 +140,7 @@ vsay(int level, const char *filename, int line, const char *error, const char *f
if (*f == '/' && *(f + 1) != '\0')
filename = f + 1;
- time_t now = (time_t) ev_now();
- struct tm tm;