ryanmelt / qtbindings

An easy to install gem version of the Ruby bindings to Qt
http://github.com/ryanmelt/qtbindings
Other
340 stars 63 forks source link

Rename rb_str_catf to qt_rb_str_catf to avoid a name collision within… #127

Closed wolfmanjm closed 7 years ago

wolfmanjm commented 9 years ago

… Ruby itself.

Not sure why but on Ubuntu 12.04 and Ruby 2.2.2 I get a name collision with rb_str_catf. On Ubuntu 14.04 with the same version of ruby no name collision. The version of Qt are very slightly different I think but that would not affect this particular name collision.

However this patch fixes it for 12.04 and still works on 14.04. It seems it should work for most versions.

What is even more strange is that if I comment out that entire rb_str_catf function it still builds and runs, so maybe it is not even used anywhere, which may explain why it compiles on 14.04 and not 12.04 as the compiler versions are different, and one my be upset about the name collision and the other is clever enough to see the function is never used anyway.

Full disclaimer I found a similar patch with a google for rb_str_catf qtbindings, however it seems that patch never made it into upstream.