From: Lior Kaplan Description: Support builds with php 5.4, update test script (allow_call_time_pass_reference is removed in PHP 5.4.0 Alpha 1) Bug-Debian: http://bugs.debian.org/656482 --- a/php/uuid.c +++ b/php/uuid.c @@ -496,7 +496,7 @@ } /* module function table */ -static function_entry uuid_functions[] = { +static zend_function_entry uuid_functions[] = { PHP_FE(uuid_create, NULL) PHP_FE(uuid_destroy, NULL) PHP_FE(uuid_clone, NULL) --- a/php/uuid.ts +++ b/php/uuid.ts @@ -60,7 +60,7 @@ print "++ testing low-level C-style API:\n"; $uuid = 42; -$rc = uuid_create(&$uuid); +$rc = uuid_create($uuid); assert('$rc == 0'); assert('$uuid != 42'); @@ -68,13 +68,13 @@ assert('$rc == 0'); $str = "foo"; -$rc = uuid_export($uuid, UUID_FMT_STR, &$str); +$rc = uuid_export($uuid, UUID_FMT_STR, $str); assert('$rc == 0'); assert('$str != "foo"'); print "UUID: $str\n"; $uuid_ns = 42; -$rc = uuid_create(&$uuid_ns); +$rc = uuid_create($uuid_ns); assert('$rc == 0'); $rc = uuid_load($uuid_ns, "ns:URL"); @@ -84,7 +84,7 @@ assert('$rc == 0'); $str = "bar"; -$rc = uuid_export($uuid, UUID_FMT_STR, &$str); +$rc = uuid_export($uuid, UUID_FMT_STR, $str); assert('$rc == 0'); assert('$str != "bar"'); #assert('$str == "02d9e6d5-9467-382e-8f9b-9300a64ac3cd"'); @@ -93,21 +93,21 @@ $rc = uuid_destroy($uuid); assert('$rc == 0'); -$rc = uuid_create(&$uuid); +$rc = uuid_create($uuid); assert('$rc == 0'); $rc = uuid_import($uuid, UUID_FMT_STR, $str); assert('$rc == 0'); $str = "baz"; -$rc = uuid_export($uuid, UUID_FMT_STR, &$str); +$rc = uuid_export($uuid, UUID_FMT_STR, $str); assert('$rc == 0'); assert('$str != "baz"'); #assert('$str == "02d9e6d5-9467-382e-8f9b-9300a64ac3cd"'); print "UUID: $str\n"; $clone = null; -$rc = uuid_clone($uuid, &$clone); +$rc = uuid_clone($uuid, $clone); assert('$rc == 0'); assert('$clone != null'); @@ -115,7 +115,7 @@ assert('$rc == 0'); $str = "quux"; -$rc = uuid_export($clone, UUID_FMT_STR, &$str); +$rc = uuid_export($clone, UUID_FMT_STR, $str); assert('$rc == 0'); assert('$str != "quux"'); #assert('$str == "02d9e6d5-9467-382e-8f9b-9300a64ac3cd"'); --- a/php/uuid.php5 +++ b/php/uuid.php5 @@ -31,14 +31,14 @@ class UUID { private $uuid = null; public function __construct() { - uuid_create(&$this->uuid); + uuid_create($this->uuid); } public function __destruct() { uuid_destroy($this->uuid); } public function __clone() { $uuid = null; - uuid_clone($this->uuid, &$uuid); + uuid_clone($this->uuid, $uuid); $this->uuid = $uuid; } public function load($name) { @@ -54,12 +54,12 @@ } public function isnil() { $result = 0; - uuid_isnil($this->uuid, &$result); + uuid_isnil($this->uuid, $result); return $result; } public function compare($other) { $result = 0; - uuid_compare($this->uuid, $other->uuid, &$result); + uuid_compare($this->uuid, $other->uuid, $result); return $result; } public function import($fmt, $data) { @@ -67,7 +67,7 @@ } public function export($fmt) { $data = ""; - uuid_export($this->uuid, $fmt, &$data); + uuid_export($this->uuid, $fmt, $data); return $data; } public function error($rc) {