Doc #64801 [Opn->Csd]: gmp_testbit Return Values text inaccurate

From: Date: Tue, 25 Jun 2013 00:28:43 +0000
Subject: Doc #64801 [Opn->Csd]: gmp_testbit Return Values text inaccurate
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-9984@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=64801&edit=1

 ID:                 64801
 Updated by:         philip@php.net
 Reported by:        phpbugs at personal dot formauri dot es
 Summary:            gmp_testbit Return Values text inaccurate
-Status:             Open
+Status:             Closed
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        philip
 Block user comment: N
 Private report:     N

 New Comment:

This is now fixed in SVN, as per:

Revision: http://svn.php.net/viewvc/?view=revision&revision=330636
Log: Clarified return value as suggested in PHP Bug #64832

Thank you for the bug report. :)

Source: http://lxr.php.net/xref/PHP_5_4/ext/gmp/gmp.c#1511


Previous Comments:
------------------------------------------------------------------------
[2013-05-09 16:10:56] phpbugs at personal dot formauri dot es

Description:
------------
The Return Values of the gmp_testbit() function reads:

Returns TRUE on success or FALSE on failure.

Judging by the examples, that is incorrect. The function seems to return TRUE if the tested bit is
1, and FALSE if it is 0.

(It is a bit of a stretch to consider a failure for a number to have a bit set to zero in the given
position.)




------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=64801&edit=1


Thread (2 messages)

« previous php.doc.bugs (#9984) next »