From 1a81a17d82ba321a44d1187759b11e599c1c57d4 Mon Sep 17 00:00:00 2001 From: ser1zw Date: Sun, 15 Jul 2012 03:28:04 +0900 Subject: [PATCH] fix for 1.8.7 --- ext/opencv/opencv.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/opencv/opencv.cpp b/ext/opencv/opencv.cpp index 30d4958..75d0317 100644 --- a/ext/opencv/opencv.cpp +++ b/ext/opencv/opencv.cpp @@ -636,7 +636,8 @@ CREATE_CVTCOLOR_FUNC(rb_HLS2RGB, CV_HLS2RGB, 3, 3); VALUE rb_build_information(VALUE klass) { - return rb_str_new_cstr(cv::getBuildInformation().c_str()); + const char* ptr = cv::getBuildInformation().c_str(); + return rb_str_new(ptr, strlen(ptr)); }