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

Remove obsolete comment #57698

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

llbit
Copy link
Contributor

@llbit llbit commented Mar 10, 2025

The bufmode_t enum was added to src/support/ios.h in d316c93 by Jeff Bezanson with the comment

// this flag controls when data actually moves out to the underlying I/O
// channel. memory streams are a special case of this where the data
// never moves out.
typedef enum { bm_none, bm_line, bm_block, bm_mem } bufmode_t;

In 30aed86 Keno Fischer added a new comment and modified the enum:

 // this flag controls when data actually moves out to the underlying I/O
 // channel. memory streams are a special case of this where the data
 // never moves out.
-typedef enum { bm_none, bm_line, bm_block, bm_mem } bufmode_t;
+
+//make it compatible with UV Handles
+typedef enum { bm_none=UV_HANDLE_TYPE_MAX+1, bm_line, bm_block, bm_mem } bufmode_t;

In c12aca8 Jameson Nash removed uv.h and updated the enum definition to no longer use UV_HANDLE_TYPE_MAX:

-typedef enum { bm_none=UV_HANDLE_TYPE_MAX+1, bm_line, bm_block, bm_mem } bufmode_t;
+typedef enum { bm_none=1000, bm_line, bm_block, bm_mem } bufmode_t;

This last change made the comment by Keno Fischer seemingly obsolete, yet the comment remains. This pull request simply removes the two lines remaining from Keno Fischer's commit. Perhaps it is better to update the comment to explain why bm_none now has the value 1000 but I did not dig deep enough into the changes to figure out if this value is significant in some way that should be documented.

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.

1 participant