cleanup TSRMLS_C macro
- only used on PHP 5 (not supported by this ext.) - not needed on PHP 7 - removed from PHP 8
This commit is contained in:
18
pdlib.cc
18
pdlib.cc
@@ -103,10 +103,10 @@ const zend_function_entry cnn_face_detection_class_methods[] = {
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_object* php_cnn_face_detection_new(zend_class_entry *class_type TSRMLS_DC)
|
||||
zend_object* php_cnn_face_detection_new(zend_class_entry *class_type)
|
||||
{
|
||||
cnn_face_detection *cfd = (cnn_face_detection*)ecalloc(1, sizeof(cnn_face_detection));
|
||||
zend_object_std_init(&cfd->std, class_type TSRMLS_CC);
|
||||
zend_object_std_init(&cfd->std, class_type);
|
||||
object_properties_init(&cfd->std, class_type);
|
||||
cfd->std.handlers = &cnn_face_detection_obj_handlers; //zend_get_std_object_handlers();
|
||||
|
||||
@@ -126,10 +126,10 @@ const zend_function_entry face_landmark_detection_class_methods[] = {
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_object* php_face_landmark_detection_new(zend_class_entry *class_type TSRMLS_DC)
|
||||
zend_object* php_face_landmark_detection_new(zend_class_entry *class_type)
|
||||
{
|
||||
face_landmark_detection *fld = (face_landmark_detection*)ecalloc(1, sizeof(face_landmark_detection));
|
||||
zend_object_std_init(&fld->std, class_type TSRMLS_CC);
|
||||
zend_object_std_init(&fld->std, class_type);
|
||||
object_properties_init(&fld->std, class_type);
|
||||
fld->std.handlers = &face_landmark_detection_obj_handlers;
|
||||
|
||||
@@ -149,10 +149,10 @@ const zend_function_entry face_recognition_class_methods[] = {
|
||||
PHP_FE_END
|
||||
};
|
||||
|
||||
zend_object* php_face_recognition_new(zend_class_entry *class_type TSRMLS_DC)
|
||||
zend_object* php_face_recognition_new(zend_class_entry *class_type)
|
||||
{
|
||||
face_recognition *fr = (face_recognition*)ecalloc(1, sizeof(face_recognition));
|
||||
zend_object_std_init(&fr->std, class_type TSRMLS_CC);
|
||||
zend_object_std_init(&fr->std, class_type);
|
||||
object_properties_init(&fr->std, class_type);
|
||||
fr->std.handlers = &face_recognition_obj_handlers;
|
||||
|
||||
@@ -174,7 +174,7 @@ PHP_MINIT_FUNCTION(pdlib)
|
||||
// CnnFaceDetection class definition
|
||||
//
|
||||
INIT_CLASS_ENTRY(ce, "CnnFaceDetection", cnn_face_detection_class_methods);
|
||||
cnn_face_detection_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
cnn_face_detection_ce = zend_register_internal_class(&ce);
|
||||
cnn_face_detection_ce->create_object = php_cnn_face_detection_new;
|
||||
memcpy(&cnn_face_detection_obj_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
cnn_face_detection_obj_handlers.offset = XtOffsetOf(cnn_face_detection, std);
|
||||
@@ -183,7 +183,7 @@ PHP_MINIT_FUNCTION(pdlib)
|
||||
// FaceLandmarkDetection class definition
|
||||
//
|
||||
INIT_CLASS_ENTRY(ce, "FaceLandmarkDetection", face_landmark_detection_class_methods);
|
||||
face_landmark_detection_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
face_landmark_detection_ce = zend_register_internal_class(&ce);
|
||||
face_landmark_detection_ce->create_object = php_face_landmark_detection_new;
|
||||
memcpy(&face_landmark_detection_obj_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
face_landmark_detection_obj_handlers.offset = XtOffsetOf(face_landmark_detection, std);
|
||||
@@ -192,7 +192,7 @@ PHP_MINIT_FUNCTION(pdlib)
|
||||
// FaceRecognition class definition
|
||||
//
|
||||
INIT_CLASS_ENTRY(ce, "FaceRecognition", face_recognition_class_methods);
|
||||
face_recognition_ce = zend_register_internal_class(&ce TSRMLS_CC);
|
||||
face_recognition_ce = zend_register_internal_class(&ce);
|
||||
face_recognition_ce->create_object = php_face_recognition_new;
|
||||
memcpy(&face_recognition_obj_handlers, zend_get_std_object_handlers(), sizeof(zend_object_handlers));
|
||||
face_recognition_obj_handlers.offset = XtOffsetOf(face_recognition, std);
|
||||
|
||||
Reference in New Issue
Block a user