[Pkg-php-commits] [php/debian-sid] Synchronize enchant patch with changes committed upstream

Raphael Geissert geissert at debian.org
Wed May 5 21:06:32 UTC 2010


---
 .../patches/enchant_unaligned_memory_access.patch  |   33 +++++++++++++++++++-
 1 files changed, 32 insertions(+), 1 deletions(-)

diff --git a/debian/patches/enchant_unaligned_memory_access.patch b/debian/patches/enchant_unaligned_memory_access.patch
index 3361938..6e530d5 100644
--- a/debian/patches/enchant_unaligned_memory_access.patch
+++ b/debian/patches/enchant_unaligned_memory_access.patch
@@ -20,7 +20,7 @@ Index: php/ext/enchant/enchant.c
  		array_init(sugg);
  
 -		suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, (size_t *) &n_sugg);
-+		suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, n_sugg_st);
++		suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st);
 +		memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg));
  		if (suggs && n_sugg) {
  			int i;
@@ -43,3 +43,34 @@ Index: php/ext/enchant/enchant.c
  	if (suggs && n_sugg) {
  		int i;
  
+Index: php/ext/enchant/tests/dict_quick_check.phpt
+===================================================================
+--- /dev/null
++++ php/ext/enchant/tests/dict_quick_check.phpt
+@@ -0,0 +1,26 @@
++--TEST--
++enchant_dict_quick_check() basic test
++--SKIPIF--
++<?php
++if(!extension_loaded('enchant')) die('skip, enchant not loader');
++
++$tag = 'en_US';
++$r = enchant_broker_init();
++if (!enchant_broker_dict_exists($r, $tag))
++    die('skip, no dictionary for ' . $tag . ' tag');
++?>
++--FILE--
++<?php
++
++$tag = 'en_US';
++$r = enchant_broker_init();
++
++$d = enchant_broker_request_dict($r, $tag);
++enchant_dict_quick_check($d, 'soong', $suggs);
++
++echo "Elements: " . count($suggs) . "\n";
++echo "Done\n";
++?>
++--EXPECTF--
++Elements: %d
++Done
-- 
1.6.5





More information about the Pkg-php-commits mailing list