Differences From
Artifact [76fc393228]:
254 254 if #tbl >= 2^32 then ty = uint64 -- hey, can't be too safe
255 255 elseif #tbl >= 2^16 then ty = uint32
256 256 elseif #tbl >= 2^8 then ty = uint16 end
257 257 local o = { t = ty, members = tbl }
258 258 local strings = {}
259 259 for i, name in ipairs(tbl) do
260 260 o[name] = `[ty]([i - 1])
261 - strings[i] = `[lib.mem.ref(int8)]{ptr=[name], ct=[#name]}
261 + strings[i] = `[lib.str.t]{ptr=[name], ct=[#name]}
262 262 end
263 263 o._str = terra(val: ty)
264 264 var l = array([strings])
265 265 return l[val]
266 266 end
267 267 return o
268 268 end
................................................................................
440 440 lib.pq = lib.loadlib('libpq','libpq-fe.h')
441 441 lib.jc = lib.loadlib('json-c','json.h')
442 442
443 443 lib.load {
444 444 'mem', 'math', 'str', 'file', 'crypt', 'ipc';
445 445 'http', 'html', 'session', 'tpl', 'store', 'acl';
446 446
447 + 'mime'; -- mimetype database & whitelist
447 448 'smackdown'; -- md-alike parser
448 - 'conv'; -- miscellaneous conversion/munging functions
449 + 'munge'; -- miscellaneous conversion/munging functions
449 450 }
450 451
451 452 local be = {}
452 453 for _, b in pairs(config.backends) do
453 454 be[#be+1] = terralib.loadfile(string.format('backend/%s.t',b))()
454 455 end
455 456 lib.store.backends = global(`array([be]))