From 4768ab334fa22927c308c4ee9d8a32571b8d2e30 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Thu, 13 Dec 2012 18:52:02 -0500
Subject: [PATCH] Allow retrieving names of OtherArg instances.

---
 pyopencl/tools.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/pyopencl/tools.py b/pyopencl/tools.py
index ad26be72..6a8bf4e7 100644
--- a/pyopencl/tools.py
+++ b/pyopencl/tools.py
@@ -258,12 +258,13 @@ class ScalarArg(DtypedArgument):
     def declarator(self):
         return "%s %s" % (dtype_to_ctype(self.dtype), self.name)
 
-class OtherArgument(Argument):
-    def __init__(self, declarator):
-        self.declarator = declarator
+class OtherArg(Argument):
+    def __init__(self, declarator, name):
+        self.decl = declarator
+        self.name = name
 
     def declarator(self):
-        return self.declarator
+        return self.decl
 
 
 
-- 
GitLab