php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #74736
Patch solr_remove_ZEND_ACC_CLONE.patch revision 2017-06-10 01:31 UTC by tandre at themeetgroup dot com

Patch solr_remove_ZEND_ACC_CLONE.patch for solr Bug #74736

Patch version 2017-06-10 01:31 UTC

Return to Bug #74736 | Download this patch
Patch Revisions:

Developer: tandre@themeetgroup.com

diff --git a/src/php7/php_solr.c b/src/php7/php_solr.c
index 568b7c5..d01cc38 100644
--- a/src/php7/php_solr.c
+++ b/src/php7/php_solr.c
@@ -45,6 +45,15 @@
 ZEND_DECLARE_MODULE_GLOBALS(solr)
 /* }}} */
 
+/* {{{ SOLR_ACC_PUBLIC_CLONEABLE MACRO */
+#ifdef ZEND_ACC_CLONE
+#define SOLR_ACC_PUBLIC_CLONEABLE (ZEND_ACC_PUBLIC | ZEND_ACC_CLONE)
+#else
+#define SOLR_ACC_PUBLIC_CLONEABLE (ZEND_ACC_PUBLIC)
+#endif
+/* }}} */
+
+
 /******************************************************************************/
 /** OBJECT HANDLERS AND DECLARATIONS FOR CLASS ENTRIES                       **/
 /******************************************************************************/
@@ -566,7 +575,7 @@ static zend_function_entry solr_document_methods[] = {
 	SOLR_CTOR(SolrDocument, __construct, SolrDocument__construct_args)
 	SOLR_DTOR(SolrDocument, __destruct, Solr_no_args)
 
-	PHP_ME(SolrDocument, __clone, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CLONE)
+	PHP_ME(SolrDocument, __clone, NULL, SOLR_ACC_PUBLIC_CLONEABLE)
 	PHP_ME(SolrDocument, __set, SolrDocument_addField_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrDocument, __get, SolrDocument_getField_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrDocument, __isset, SolrDocument_fieldExists_args, ZEND_ACC_PUBLIC)
@@ -609,7 +618,7 @@ static zend_function_entry solr_document_methods[] = {
 static zend_function_entry solr_input_document_methods[] = {
 	SOLR_CTOR(SolrInputDocument, __construct, SolrInputDocument__construct_args)
 	SOLR_DTOR(SolrInputDocument, __destruct, Solr_no_args)
-	PHP_ME(SolrInputDocument, __clone, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CLONE)
+	PHP_ME(SolrInputDocument, __clone, NULL, SOLR_ACC_PUBLIC_CLONEABLE)
 	PHP_ME(SolrInputDocument, __sleep, Solr_no_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrInputDocument, __wakeup, NULL, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrInputDocument, setBoost, SolrInputDocument_setBoost_args, ZEND_ACC_PUBLIC)
@@ -645,7 +654,7 @@ static zend_function_entry solr_client_methods[] = {
 	SOLR_DTOR(SolrClient, __destruct, Solr_no_args)
 	PHP_ME(SolrClient, __sleep, Solr_no_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrClient, __wakeup, NULL, ZEND_ACC_PUBLIC)
-	PHP_ME(SolrClient, __clone, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CLONE)
+	PHP_ME(SolrClient, __clone, NULL, SOLR_ACC_PUBLIC_CLONEABLE)
 	PHP_ME(SolrClient, getOptions, Solr_no_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrClient, getDebug, Solr_no_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrClient, setServlet, SolrClient_setServlet_args, ZEND_ACC_PUBLIC)
@@ -722,7 +731,7 @@ static zend_function_entry solr_params_methods[] = {
 	PHP_ME(SolrParams, getParams, Solr_no_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrParams, getParam, SolrParams_getParam_args, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrParams, getPreparedParams, Solr_no_args, ZEND_ACC_PUBLIC)
-	PHP_ME(SolrParams, __clone, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_CLONE)
+	PHP_ME(SolrParams, __clone, NULL, SOLR_ACC_PUBLIC_CLONEABLE)
 	PHP_ME(SolrParams, serialize,   NULL, ZEND_ACC_PUBLIC)
 	PHP_ME(SolrParams, unserialize,  SolrParams_unserialize_args, ZEND_ACC_PUBLIC)
 	PHP_MALIAS(SolrParams, add, addParam, SolrParams_addParam_args, ZEND_ACC_PUBLIC)
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Fri Nov 27 06:01:23 2020 UTC