1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-17 18:50:33 -04:00
ports/devel/ruby-qtruby/files/patch-src_qtruby.cpp
Tobias C. Berner e2ae4019e0 Fix ruby-qtruby with newer clang
Clang 4.0 trips on the bogus  pointer comparison.
As the produced code may change, bump PORTREVISION.

PR:		216218
Reported by:	jbeich
Approved by:	rakuco (mentor)
2017-01-20 12:45:03 +00:00

13 lines
305 B
C++

Fix bogus pointer comparison.
--- src/qtruby.cpp.orig 2017-01-18 20:21:44 UTC
+++ src/qtruby.cpp
@@ -2094,7 +2094,7 @@ isObject(VALUE /*self*/, VALUE obj)
{
void * ptr = 0;
ptr = value_to_ptr(obj);
- return (ptr > 0 ? Qtrue : Qfalse);
+ return (ptr ? Qtrue : Qfalse);
}
static VALUE