Commit 9d619d14 authored by Jamey Sharp's avatar Jamey Sharp

Match only XCB-namespaced XID generators when converting to xcb_generate_id.

Thanks to Vincent Torri for pointing out that I screwed up. :-)
parent 5ec55dc9
......@@ -59,6 +59,7 @@ sub convert($$)
local $_ = shift;
my ($fun) = @_;
return "xcb_generate_id" if /^xcb_[a-z0-9_]+_new$/ or /^XCB[A-Z0-9]+New$/;
return "uint$1_t" if /^CARD(8|16|32)$/;
return "int$1_t" if /^INT(8|16|32)$/;
return "uint8_t" if $_ eq 'BOOL' or $_ eq 'BYTE';
......@@ -95,4 +96,3 @@ sub convert($$)
s/^(\s*#\s*include\s*<)X11\/XCB\//$1xcb\//;
s/([_A-Za-z][_A-Za-z0-9]*)([ \t]*\()?/convert($1, defined $2) . ($2 or "")/eg;
s/xcb_[a-z0-9_]*_new/xcb_generate_id/g;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment