Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify return value of strcmp() and friends (fixes #3629) #4295

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jimwins
Copy link
Member

@jimwins jimwins commented Dec 11, 2024

No description provided.

Copy link
Member

@Girgias Girgias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MSTM

Comment on lines +860 to +861
<literal>1</literal> instead. Instead of depending on any concrete
value, the return value should be compared to <literal>0</literal>.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if that last sentence makes sense. These functions are primarily used in usort. I would either remove that sentence or make it so that it talks about tri-way comparison, less than, greater than and equal to zero.

@@ -4390,6 +4393,18 @@ local: {
</para>
'>

<!ENTITY strings.comparison.return '
<simpara xmlns="http://docbook.org/ns/docbook">
Returns a value less than 0 <parameter>string1</parameter>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this missing "if" or "when"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants