parsav  Diff

Differences From Artifact [040ddf2134]:

To Artifact [18ea7fb9d0]:


   901    901   			buf[3] = sz
   902    902   			for j=0,sz do buf[4 + j] = i.v6[j] end -- 😬
   903    903   			return buf
   904    904   		end
   905    905   	end;
   906    906   }
   907    907   
   908         -local sqlvars = {}
          908  +local sqlvars = {
          909  + -- unforunately necessary to generate IDs that fill the whole
          910  + -- address space (due to floating-point shenanigans); there's
          911  + -- just no good way of doing this with SQL
          912  +	['def:uniq'] = [[bigint primary key default (
          913  +		 (random() * ((1::bigint << 32) - 1)    )::bigint << 32 | 
          914  +		 (random() * ((1::bigint << 32) - 2) + 1)::bigint
          915  +	)]]
          916  +}
   909    917   for i, n in ipairs(lib.store.noticetype.members) do
   910    918   	sqlvars['notice:' .. n] = lib.store.noticetype[n]:asvalue()
   911    919   end
   912    920   
   913    921   for i, n in ipairs(lib.store.relation.members) do
   914    922   	sqlvars['rel:' .. n] = lib.store.relation.idvmap[n]
   915    923   end
................................................................................
   974    982   				var ipbuf: int8[20]
   975    983   				;[pqt[lib.store.inet](false)]([args[i]], [&uint8](&ipbuf))
   976    984   			in &ipbuf[0] end
   977    985   			dumpers[#dumpers+1] = `lib.io.fmt([tostring(i)..'. got inet\n'])
   978    986   		elseif ty.ptr_basetype == int8 or ty.ptr_basetype == uint8 then
   979    987   			counters[i] = `[args[i]].ct
   980    988   			casts[i] = `[&int8]([args[i]].ptr)
   981         -			dumpers[#dumpers+1] = `lib.io.fmt([tostring(i)..'. got ptr %llu %.*s\n'], [args[i]].ct, [args[i]].ct, [args[i]].ptr)
          989  +			dumpers[#dumpers+1] = `lib.io.fmt([tostring(i)..'. got ptr %p %.*s\n'], [args[i]].ct, [args[i]].ct, [args[i]].ptr)
   982    990   		elseif ty.ptr_basetype == bool then
   983    991   			counters[i] = `1
   984    992   			casts[i] = `[&int8]([args[i]].ptr)
   985    993   			-- dumpers[#dumpers+1] = `lib.io.fmt([tostring(i)..'. got bool = %hhu\n'], @[args[i]].ptr)
   986    994   		elseif ty:isintegral() then
   987    995   			counters[i] = ty.bytes
   988    996   			casts[i] = `[&int8](&[args[i]])