On Sun, Feb 26, 2012 at 9:31 AM, Anurag Priyam <anurag08pri...@gmail.com> wrote:
> On Fri, Feb 17, 2012 at 10:24 PM, Uli Schlachter <psyc...@znc.in> wrote:
>> You might be interested in the following commit:
>>
>> commit 2216b6a341ddb840200ea85207f8a59a5b3d61a6
>> Author: Uli Schlachter <psyc...@znc.in>
>> Date:   Fri Feb 17 17:48:11 2012 +0100
>>
>>    gears.color: Add table-based color definitions
>>
>>    Signed-off-by: Uli Schlachter <psyc...@znc.in>
>>
>> The syntax is almost identical to what you proposed above. The only 
>> difference
>> is that I went with "type" instead of "gradient".

And I caught a bug that you introduced :D.

[...]
Subject: [PATCH] gears.color: call the correct creator function in local
 string_pattern function

The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.

Signed-off-by: Anurag Priyam <anurag08pri...@gmail.com>
---
 lib/gears/color.lua.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua.in
index d285c4a..1299ff6 100644
--- a/lib/gears/color.lua.in
+++ b/lib/gears/color.lua.in
@@ -105,7 +105,7 @@ local function string_pattern(creator, arg)
         table.insert(args, v)
     end
     -- And call our creator function with the values
-    local p = v(unpack(args))
+    local p = creator(unpack(args))

     add_iterator_stops(p, iterator)
     return p

Copy-paste error?  Looks like a reminiscent of the older metatable hack.

-- 
Anurag Priyam
From 3f84ddb65ccfbb2c611e9db58e248741aa1e84b9 Mon Sep 17 00:00:00 2001
From: Anurag Priyam <anurag08pri...@gmail.com>
Date: Sun, 26 Feb 2012 09:39:09 +0530
Subject: [PATCH] gears.color: call the correct creator function in local
 string_pattern function

The corresponding pattern factory that `string_pattern` delegates to is stored
in the `creator` parameter, and not `v`; probably a typo.

Signed-off-by: Anurag Priyam <anurag08pri...@gmail.com>
---
 lib/gears/color.lua.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/gears/color.lua.in b/lib/gears/color.lua.in
index d285c4a..1299ff6 100644
--- a/lib/gears/color.lua.in
+++ b/lib/gears/color.lua.in
@@ -105,7 +105,7 @@ local function string_pattern(creator, arg)
         table.insert(args, v)
     end
     -- And call our creator function with the values
-    local p = v(unpack(args))
+    local p = creator(unpack(args))
 
     add_iterator_stops(p, iterator)
     return p
-- 
1.7.9

Reply via email to