There are two ways to handle this. One is to use the _ placeholder value when multiple values are needed. The second is to use list indexing to get only the values actually needed when only one value is desired.
Signed-off-by: Dylan Baker <[email protected]> --- src/mapi/glapi/gen/glX_proto_send.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mapi/glapi/gen/glX_proto_send.py b/src/mapi/glapi/gen/glX_proto_send.py index 3de11d4..8ea799a 100644 --- a/src/mapi/glapi/gen/glX_proto_send.py +++ b/src/mapi/glapi/gen/glX_proto_send.py @@ -65,7 +65,7 @@ def hash_pixel_function(func): hash_suf = "" for param in func.parameterIterateGlxSend(): if param.is_image(): - [dim, junk, junk, junk, junk] = param.get_dimensions() + dim = param.get_dimensions()[0] d = (dim + 1) & ~1 hash_pre = "%uD%uD_" % (d - 1, d) @@ -512,7 +512,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): print '(void) memcpy((void *)(%s + %u), zero, 4);' % (pc, (param.offset + param.size()) + adjust) else: - [dim, width, height, depth, extent] = param.get_dimensions() + dim, width, height, depth, _ = param.get_dimensions() if f.glx_rop == ~0: dim_str = "dim" else: @@ -662,7 +662,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): print ' %s_reply_t *reply = %s_reply(c, %s, NULL);' % (xcb_name, xcb_name, xcb_request) if output: if output.is_image(): - [dim, w, h, d, junk] = output.get_dimensions() + dim, w, h, d, _ = output.get_dimensions() if f.dimensions_in_reply: w = "reply->width" h = "reply->height" @@ -732,7 +732,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): for p in f.parameterIterateOutputs(): if p.is_image(): - [dim, w, h, d, junk] = p.get_dimensions() + dim, w, h, d, _ = p.get_dimensions() if f.dimensions_in_reply: print " __glXReadPixelReply(dpy, gc, %u, 0, 0, 0, %s, %s, %s, GL_TRUE);" % (dim, p.img_format, p.img_type, p.name) else: @@ -796,7 +796,7 @@ class PrintGlxProtoStubs(glX_proto_common.glx_print_proto): p_string += ", " + param.name if param.is_image(): - [dim, junk, junk, junk, junk] = param.get_dimensions() + dim = param.get_dimensions()[0] if f.pad_after(param): p_string += ", 1" -- 2.8.0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
