summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Kolb <jkolb@freedesktop.org>2005-06-20 03:12:35 +0000
committerJeremy Kolb <jkolb@freedesktop.org>2005-06-20 03:12:35 +0000
commit4378dee78ce08a66a0d81cc603abe5d64895093f (patch)
treed5804e8ea0f6335582b1ffcd03a12ab5748e81b4 /src
parent38332a6d94d4f9541bff939522230731f1705e04 (diff)
Fixed some issues where XCB replies were being freed and data was not being copied.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/glapi/glX_proto_send.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/glapi/glX_proto_send.py b/src/mesa/glapi/glX_proto_send.py
index ef47edd42a..94c096e686 100644
--- a/src/mesa/glapi/glX_proto_send.py
+++ b/src/mesa/glapi/glX_proto_send.py
@@ -453,11 +453,9 @@ generic_%u_byte( GLint rop, const void * ptr )
elif f.output and not f.reply_always_array:
if not f.image and not f.name == "GenQueriesARB":
print ' if (%sDataLength(reply) == 0)' % (xcb_name)
- print ' %s = (%s *) &reply->datum;' % (f.output.name, f.output.p_type.name)
+ print ' (void)memcpy(%s, &reply->datum, sizeof(reply->datum));' % (f.output.name)
print ' else'
- print ' %s = (%s *)%sData(reply);' % (f.output.name, f.output.p_type.name, xcb_name)
- else:
- print ' %s = (%s *)%sData(reply);' % (f.output.name, f.output.p_type.name, xcb_name)
+ print ' (void)memcpy(%s, %sData(reply), %sDataLength(reply) * sizeof(%s));' % (f.output.name, xcb_name, xcb_name, f.output.p_type.name)
if f.fn_return_type != 'void':