Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:66019 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 28045 invoked from network); 20 Feb 2013 07:09:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2013 07:09:23 -0000 Authentication-Results: pb1.pair.com smtp.mail=tjerk.meesters@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tjerk.meesters@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.47 as permitted sender) X-PHP-List-Original-Sender: tjerk.meesters@gmail.com X-Host-Fingerprint: 209.85.216.47 mail-qa0-f47.google.com Received: from [209.85.216.47] ([209.85.216.47:36149] helo=mail-qa0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 7E/C0-19387-1A674215 for ; Wed, 20 Feb 2013 02:09:22 -0500 Received: by mail-qa0-f47.google.com with SMTP id j8so2263801qah.20 for ; Tue, 19 Feb 2013 23:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:date:x-google-sender-auth:message-id :subject:from:to:content-type; bh=naq90EQioutGkA8q7JFNRptemQ7nKcrclXNG5HnOzoQ=; b=EuhlTZyiyk8Gzdq/mUQ1O0eJ/8hiwZHn8nQNmIs/n0xi/sKIQDhg0gwytgjPUnxbZZ AQ/2FjpziS1nAxs/AfEm3XCxJLyjFbCCp0fPPLamwhLWlb/5/MgFGCG1QeyIeWQT6FMJ u3/N4xCS+EgEjPsj8FsY5KEDxviNcmyvXop6sRP5NnrG2KilROf6ustDgeTreICuWO0W lLVlQd0z0myyd5zusKP6dRvreDnIH8cbASgKlXgo+vjGtw9uU+Higxs/xLC24TdnlnMC DqujJqzscLFvotjJKq6k8nOuks3h1x6ah3/gsNHFB3rCOZMSzt+pUrzFHtCeK9HRSZw8 RpEQ== MIME-Version: 1.0 X-Received: by 10.49.62.129 with SMTP id y1mr7426824qer.28.1361344159515; Tue, 19 Feb 2013 23:09:19 -0800 (PST) Sender: tjerk.meesters@gmail.com Received: by 10.49.120.163 with HTTP; Tue, 19 Feb 2013 23:09:19 -0800 (PST) Date: Wed, 20 Feb 2013 15:09:19 +0800 X-Google-Sender-Auth: cQMt3HXki7jtVv-oNDgWwsuBzGw Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=047d7bdc05600bcd7b04d622a324 Subject: Question on hash api From: datibbaw@php.net (Tjerk Anne Meesters) --047d7bdc05600bcd7b04d622a324 Content-Type: text/plain; charset=ISO-8859-1 Hi, I've forked out an interesting project on Github that implements XXHash and extended it to work with the hash() function family. Project links below. The integration is pretty straightforward, but the following code had me concerned: PHP_HASH_API void PHP_XXH32Update(PHP_XXH32_CTX *context, const unsigned char *input, unsigned int inputLen) { XXH32_feed(context->state, (void *)input, (int)inputLen); } The XXH32_feed() takes an int argument, whereas the update ops function takes an unsigned int for the input length. Would that ever give a problem? If so, what kind of workaround am I looking at? Thanks! Project links: php-xxhash: https://github.com/datibbaw/php-xxhash XXHash: http://code.google.com/p/xxhash/ --047d7bdc05600bcd7b04d622a324--