Bump minimum lgi dependency to 0.7.0
Before commit 1b2826 in lgi, the get_rgba() function on cairo SolidPatterns was specified like this: get_rgba = { ret = cairo.Status, { ti.double, dir = 'out' }, { ti.double, dir = 'out' }, { ti.double, dir = 'out' } }, The above commit fixed this (without saying so) and the code became: get_rgba = { ret = cairo.Status, { ti.double, dir = 'out' }, { ti.double, dir = 'out' }, { ti.double, dir = 'out' }, { ti.double, dir = 'out' } }, The prototype for the corresponding cairo function is: cairo_public cairo_status_t cairo_pattern_get_rgba (cairo_pattern_t *pattern, double *red, double *green, double *blue, double *alpha); As you see, this functions gets four double* as arguments and it will save its result via those pointers. Old versions of lgi call this function with too few arguments and this will cause a segmentation fault when cairo dereferences an invalid pointer. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
7c3702e60a
commit
41bc77d64c
|
@ -25,7 +25,8 @@ die()
|
|||
lua -e 'require("lgi")' || die
|
||||
|
||||
# Check the version number
|
||||
lua -e 'if tonumber(string.match(require("lgi.version"), "(%d%.%d)")) <= 0.5 then error("lgi too old, need at least version 0.6.1") end' || die
|
||||
# Keep this in sync with lib/gears/surface.lua.in!
|
||||
lua -e 'if tonumber(string.match(require("lgi.version"), "(%d%.%d)")) < 0.7 then error("lgi too old, need at least version 0.7.0") end' || die
|
||||
|
||||
# Check for the needed gi files
|
||||
lua -e 'l = require("lgi") assert(l.cairo, l.Pango, l.PangoCairo)' || die
|
||||
|
|
|
@ -9,11 +9,10 @@ local type = type
|
|||
local capi = { awesome = awesome }
|
||||
local cairo = require("lgi").cairo
|
||||
|
||||
-- This checks for '<= 0.5' because there are git versions after 0.6 which still
|
||||
-- identify themselves as 0.6 but already have the needed cairo support
|
||||
local ver_major,ver_minor = string.match(require('lgi.version'),'(%d)%.(%d)')
|
||||
if ( (tonumber(ver_major)<=0) and (tonumber(ver_minor)<=5) ) then
|
||||
error("lgi too old, need at least version 0.6.1")
|
||||
-- Keep this in sync with build-utils/lgi-check.sh!
|
||||
local ver_major, ver_minor = string.match(require('lgi.version'), '(%d)%.(%d)')
|
||||
if tonumber(ver_major) <= 0 and tonumber(ver_minor) < 7 then
|
||||
error("lgi too old, need at least version 0.7.0")
|
||||
end
|
||||
|
||||
-- gears.surface
|
||||
|
|
Loading…
Reference in New Issue