Skip to content

Commit 9bd5e79

Browse files
authored
[Sync EN] quickhash: Specify correct return type and values for set() (#2740)
* [Sync EN] quickhash: Specify correct return type and values for set()
1 parent d7260e5 commit 9bd5e79

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

  • reference/quickhash/quickhashinthash

reference/quickhash/quickhashinthash/set.xml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<!-- EN-Revision: 34c7b33526bef25c40c2ab0dcd8709c8948964c5 Maintainer: Fan2Shrek Status: ready -->
2+
<!-- EN-Revision: 7ac16ce2e1d9a65f4f10a92f3161d95c9e27f053 Maintainer: lacatoire Status: ready -->
33
<!-- Reviewed: yes -->
44
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="quickhashinthash.set">
55
<refnamediv>
@@ -11,7 +11,7 @@
1111
<refsect1 role="description">
1212
&reftitle.description;
1313
<methodsynopsis>
14-
<modifier>public</modifier> <type>bool</type><methodname>QuickHashIntHash::set</methodname>
14+
<modifier>public</modifier> <type>int</type><methodname>QuickHashIntHash::set</methodname>
1515
<methodparam><type>int</type><parameter>key</parameter></methodparam>
1616
<methodparam><type>int</type><parameter>value</parameter></methodparam>
1717
</methodsynopsis>
@@ -50,7 +50,7 @@
5050
<refsect1 role="returnvalues">
5151
&reftitle.returnvalues;
5252
<simpara>
53-
2 si l'entrée a été trouvée et mise à jour, 1 si l'entrée a été nouvellement ajoutée ou 0
53+
2 si l'entrée a été nouvellement ajoutée, 1 si l'entrée a été trouvée et mise à jour, ou 0
5454
s'il y a eu une erreur.
5555
</simpara>
5656
</refsect1>
@@ -62,17 +62,17 @@
6262
<programlisting role="php">
6363
<![CDATA[
6464
<?php
65-
$hash = new QuickHashIntHash( 1024 );
65+
66+
$hash = new QuickHashIntHash(1024);
6667
6768
echo "Set->Add\n";
68-
var_dump( $hash->get( 46692 ) );
69-
var_dump( $hash->set( 46692, 16091 ) );
70-
var_dump( $hash->get( 46692 ) );
69+
var_dump($hash->get(46692));
70+
var_dump($hash->set(46692, 16091));
71+
var_dump($hash->get(46692));
7172
72-
echo "Set->Update\n";
73-
var_dump( $hash->set( 46692, 29906 ) );
74-
var_dump( $hash->get( 46692 ) );
75-
?>
73+
echo "\n\nSet->Update\n";
74+
var_dump($hash->set(46692, 29906));
75+
var_dump($hash->get(46692));
7676
]]>
7777
</programlisting>
7878
&example.outputs.similar;
@@ -82,6 +82,7 @@ Set->Add
8282
bool(false)
8383
int(2)
8484
int(16091)
85+
8586
Set->Update
8687
int(1)
8788
int(29906)

0 commit comments

Comments
 (0)