403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/graphics/rubygem-objectdetect/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/graphics/rubygem-objectdetect/files/patch-ext-objectdetect.c
--- ext/objectdetect.c.orig	2013-05-04 21:19:44.000000000 +0900
+++ ext/objectdetect.c	2013-05-04 21:53:21.000000000 +0900
@@ -5,7 +5,15 @@
 
 #include "cv.h"
 #include "highgui.h"
-#include "ruby.h"
+#ifdef HAVE_RUBY_ST_H
+# include "ruby/ruby.h"
+#else
+# include "ruby.h"
+#endif
+
+#ifndef RSTRING_PTR
+# define RSTRING_PTR(str) (RSTRING(str)->ptr)
+#endif
 
 /*
 call-seq:
@@ -25,13 +33,13 @@
   Check_Type(target_path, T_STRING);
 
   /* load the model */
-  CvHaarClassifierCascade* cascade = cvLoad(RSTRING(model_path)->ptr, 0, 0, 0);
+  CvHaarClassifierCascade* cascade = cvLoad(RSTRING_PTR(model_path), 0, 0, 0);
   if( cascade == 0 ) {
     rb_raise(rb_eArgError, "Can't load the cascade file");
   }
 
   /* load the target picture */
-  IplImage *img = cvLoadImage(RSTRING(target_path)->ptr, 1);
+  IplImage *img = cvLoadImage(RSTRING_PTR(target_path), 1);
   if( !img ) {
     cvReleaseHaarClassifierCascade(&cascade);
     rb_raise(rb_eArgError, "Can't load the image file");
@@ -62,7 +70,7 @@
   CvMemStorage* storage = cvCreateMemStorage(0);
   CvSeq *faces = cvHaarDetectObjects(small_img, cascade, storage,
 				     1.1, 2, CV_HAAR_DO_CANNY_PRUNING,
-				     cvSize(0,0) );
+				     cvSize(0,0), cvSize(0,0) );
 
   /* output */
   VALUE results = rb_ary_new();

Youez - 2016 - github.com/yon3zu
LinuXploit