Remove Arr object

Esse commit está contido em:
Michael Maclean
2013-01-02 20:41:01 +00:00
commit 895f43a6c2
6 arquivos alterados com 3 adições e 70 exclusões
+1 -1
Ver Arquivo
@@ -27,7 +27,7 @@ if test "$PHP_OPENCV" != "no"; then
PHP_NEW_EXTENSION( PHP_NEW_EXTENSION(
opencv, 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, $ext_shared,
, ,
, ,
-1
Ver Arquivo
@@ -107,7 +107,6 @@ PHP_MINIT_FUNCTION(opencv)
*/ */
PHP_MINIT(opencv_error)(INIT_FUNC_ARGS_PASSTHRU); 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_mat)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(opencv_image)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(opencv_image)(INIT_FUNC_ARGS_PASSTHRU);
PHP_MINIT(opencv_histogram)(INIT_FUNC_ARGS_PASSTHRU); PHP_MINIT(opencv_histogram)(INIT_FUNC_ARGS_PASSTHRU);
-58
Ver Arquivo
@@ -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
Ver Arquivo
@@ -823,7 +823,7 @@ PHP_MINIT_FUNCTION(opencv_image)
zend_class_entry ce; zend_class_entry ce;
INIT_NS_CLASS_ENTRY(ce, "OpenCV", "Image", opencv_image_methods); 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; opencv_ce_image->create_object = opencv_image_object_new;
#define REGISTER_IMAGE_LONG_CONST(const_name, value) \ #define REGISTER_IMAGE_LONG_CONST(const_name, value) \
+1 -1
Ver Arquivo
@@ -104,7 +104,7 @@ PHP_MINIT_FUNCTION(opencv_mat)
zend_class_entry ce; zend_class_entry ce;
INIT_NS_CLASS_ENTRY(ce, "OpenCV", "Mat", opencv_mat_methods); 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; return SUCCESS;
} }
-8
Ver Arquivo
@@ -66,7 +66,6 @@ using namespace cv;
PHP_MINIT_FUNCTION(opencv); PHP_MINIT_FUNCTION(opencv);
PHP_MINIT_FUNCTION(opencv_error); PHP_MINIT_FUNCTION(opencv_error);
PHP_MINIT_FUNCTION(opencv_mat); PHP_MINIT_FUNCTION(opencv_mat);
PHP_MINIT_FUNCTION(opencv_arr);
PHP_MINIT_FUNCTION(opencv_image); PHP_MINIT_FUNCTION(opencv_image);
PHP_MINIT_FUNCTION(opencv_histogram); PHP_MINIT_FUNCTION(opencv_histogram);
PHP_MINIT_FUNCTION(opencv_capture); PHP_MINIT_FUNCTION(opencv_capture);
@@ -77,17 +76,10 @@ PHP_RINIT_FUNCTION(opencv);
extern zend_object_handlers opencv_std_object_handlers; extern zend_object_handlers opencv_std_object_handlers;
extern zend_class_entry *opencv_ce_cvexception; extern zend_class_entry *opencv_ce_cvexception;
extern zend_class_entry *opencv_ce_cvmat; 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_image;
extern zend_class_entry *opencv_ce_histogram; 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 { typedef struct _opencv_mat_object {
zend_object std; zend_object std;
zend_bool constructed; zend_bool constructed;