[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] com =?UTF-8?Q?pecl/search=5Fengine/solr=3A=20Fix=20collapse=20function=20?= =?UTF-8?Q?ind
From: Omar Shaban <omars () php ! net>
Date: 2015-09-22 21:28:50
Message-ID: php-mail-9c6c94619a425d95f30e12b0e026889b1741328023 () git ! php ! net
[Download RAW message or body]
Commit: 4f6e9b53a822e8477e4b5718434be49f94ba6cd3
Author: Omar Shaban <omars@php.net> Tue, 22 Sep 2015 23:28:50 +0200
Parents: 738fa3e2388c8a496e5bf0b84d6469e5c53f2cf4
Branches: master
Link: http://git.php.net/?p=pecl/search_engine/solr.git;a=commitdiff;h=4f6e9b53a822e8477e4b5718434be49f94ba6cd3
Log:
Fix collapse function index unexpected removal
Changed paths:
M php_solr_collapse_function.c
Diff:
diff --git a/php_solr_collapse_function.c b/php_solr_collapse_function.c
index 1df1466..a03a30d 100644
--- a/php_solr_collapse_function.c
+++ b/php_solr_collapse_function.c
@@ -28,6 +28,7 @@ PHP_METHOD(SolrCollapseFunction, __construct)
solr_function_t *solr_function_dest = NULL;
solr_function_t solr_function;
zval *index_prop = NULL;
+ zval *objptr = getThis();
solr_char_t *param_name = (solr_char_t *)"field";
int param_name_len = sizeof("field");
@@ -45,11 +46,12 @@ PHP_METHOD(SolrCollapseFunction, __construct)
return ;
}
+ zend_update_property_long(solr_ce_SolrCollapseFunction, objptr, \
SOLR_INDEX_PROPERTY_NAME, sizeof(SOLR_INDEX_PROPERTY_NAME) - 1, index TSRMLS_CC);
solr_function_dest->function_index = index;
solr_function_dest->name_length = strlen("collapse");
- solr_function_dest->name = strndup("collapse", solr_function_dest->name_length);
+ solr_function_dest->name = strndup("collapse", solr_function_dest->name_length \
);
/* Allocated memory for the params HashTable using fast cache for HashTables */
ALLOC_HASHTABLE(solr_function_dest->params);
@@ -82,8 +84,10 @@ PHP_METHOD(SolrCollapseFunction, __destruct)
/* Retrieve the document entry for this SolrDocument */
if (solr_fetch_function_entry(getThis(), &function TSRMLS_CC) == SUCCESS )
{
+// efree(function->name);
zend_hash_index_del(SOLR_GLOBAL(functions), function->function_index);
}
+
return;
}
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic