Remove Arr object
Esse commit está contido em:
+1
-1
@@ -27,7 +27,7 @@ if test "$PHP_OPENCV" != "no"; then
|
||||
|
||||
PHP_NEW_EXTENSION(
|
||||
opencv,
|
||||
opencv.cpp opencv_error.cpp opencv_mat.cpp opencv_arr.cpp opencv_image.cpp opencv_histogram.cpp opencv_capture.cpp,
|
||||
opencv.cpp opencv_error.cpp opencv_mat.cpp opencv_image.cpp opencv_histogram.cpp opencv_capture.cpp,
|
||||
$ext_shared,
|
||||
,
|
||||
,
|
||||
|
||||
@@ -107,7 +107,6 @@ PHP_MINIT_FUNCTION(opencv)
|
||||
*/
|
||||
|
||||
PHP_MINIT(opencv_error)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MINIT(opencv_arr)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MINIT(opencv_mat)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MINIT(opencv_image)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
PHP_MINIT(opencv_histogram)(INIT_FUNC_ARGS_PASSTHRU);
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
+----------------------------------------------------------------------+
|
||||
| PHP Version 5 |
|
||||
+----------------------------------------------------------------------+
|
||||
| Copyright (c) 1997-2010 The PHP Group |
|
||||
+----------------------------------------------------------------------+
|
||||
| This source file is subject to version 3.01 of the PHP license, |
|
||||
| that is bundled with this package in the file LICENSE, and is |
|
||||
| available through the world-wide-web at the following url: |
|
||||
| http://www.php.net/license/3_01.txt |
|
||||
| If you did not receive a copy of the PHP license and are unable to |
|
||||
| obtain it through the world-wide-web, please send a note to |
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
| Author: Michael Maclean <mgdm@php.net> |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "php.h"
|
||||
#include "php_opencv.h"
|
||||
#include "zend_exceptions.h"
|
||||
|
||||
zend_class_entry *opencv_ce_cvarr;
|
||||
|
||||
/* {{{ proto void contruct()
|
||||
OpenCV_Arr CANNOT be extended in userspace, this will throw an exception on use */
|
||||
PHP_METHOD(OpenCV_Arr, __construct)
|
||||
{
|
||||
zend_throw_exception(opencv_ce_cvexception, "OpenCV\\Arr cannot be constructed", 0 TSRMLS_CC);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ opencv_arr_methods[] */
|
||||
const zend_function_entry opencv_arr_methods[] = {
|
||||
PHP_ME(OpenCV_Arr, __construct, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)
|
||||
{NULL, NULL, NULL}
|
||||
};
|
||||
/* }}} */
|
||||
|
||||
/* {{{ PHP_MINIT_FUNCTION */
|
||||
PHP_MINIT_FUNCTION(opencv_arr)
|
||||
{
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_NS_CLASS_ENTRY(ce, "OpenCV", "Arr", opencv_arr_methods);
|
||||
opencv_ce_cvarr = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
+1
-1
@@ -823,7 +823,7 @@ PHP_MINIT_FUNCTION(opencv_image)
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_NS_CLASS_ENTRY(ce, "OpenCV", "Image", opencv_image_methods);
|
||||
opencv_ce_image = zend_register_internal_class_ex(&ce, opencv_ce_cvarr, NULL TSRMLS_CC);
|
||||
opencv_ce_image = zend_register_internal_class_ex(&ce, opencv_ce_cvmat, NULL TSRMLS_CC);
|
||||
opencv_ce_image->create_object = opencv_image_object_new;
|
||||
|
||||
#define REGISTER_IMAGE_LONG_CONST(const_name, value) \
|
||||
|
||||
+1
-1
@@ -104,7 +104,7 @@ PHP_MINIT_FUNCTION(opencv_mat)
|
||||
zend_class_entry ce;
|
||||
|
||||
INIT_NS_CLASS_ENTRY(ce, "OpenCV", "Mat", opencv_mat_methods);
|
||||
opencv_ce_cvarr = zend_register_internal_class_ex(&ce, opencv_ce_cvarr, NULL TSRMLS_CC);
|
||||
opencv_ce_cvmat = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,6 @@ using namespace cv;
|
||||
PHP_MINIT_FUNCTION(opencv);
|
||||
PHP_MINIT_FUNCTION(opencv_error);
|
||||
PHP_MINIT_FUNCTION(opencv_mat);
|
||||
PHP_MINIT_FUNCTION(opencv_arr);
|
||||
PHP_MINIT_FUNCTION(opencv_image);
|
||||
PHP_MINIT_FUNCTION(opencv_histogram);
|
||||
PHP_MINIT_FUNCTION(opencv_capture);
|
||||
@@ -77,17 +76,10 @@ PHP_RINIT_FUNCTION(opencv);
|
||||
extern zend_object_handlers opencv_std_object_handlers;
|
||||
extern zend_class_entry *opencv_ce_cvexception;
|
||||
extern zend_class_entry *opencv_ce_cvmat;
|
||||
extern zend_class_entry *opencv_ce_cvarr;
|
||||
extern zend_class_entry *opencv_ce_image;
|
||||
extern zend_class_entry *opencv_ce_histogram;
|
||||
|
||||
|
||||
typedef struct _opencv_arr_object {
|
||||
zend_object std;
|
||||
zend_bool constructed;
|
||||
CvArr *cvptr;
|
||||
} opencv_arr_object;
|
||||
|
||||
typedef struct _opencv_mat_object {
|
||||
zend_object std;
|
||||
zend_bool constructed;
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário