Skip to content

Commit 227ec11

Browse files
committed
Rename native_handle_type to open_handle_type
1 parent e877773 commit 227ec11

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

include/tmp/filebuf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ namespace tmp {
1616
/// opening a file fails
1717
class filebuf : public std::filebuf {
1818
public:
19-
/// Implementation-defined handle type to the file
19+
/// Implementation-defined handle type to the open file
2020
#if defined(_WIN32)
21-
using native_handle_type = std::FILE*;
21+
using open_handle_type = std::FILE*;
2222
#elif __has_include(<unistd.h>)
23-
using native_handle_type = int; // POSIX file descriptor
23+
using open_handle_type = int; // POSIX file descriptor
2424
#else
2525
#error "Target platform not supported"
2626
#endif
@@ -29,7 +29,7 @@ public:
2929
/// @param handle A handle to the open file
3030
/// @param mode The file opening mode
3131
/// @returns `this` file buffer, or a null pointer on failure
32-
filebuf* open(native_handle_type handle, std::ios::openmode mode);
32+
filebuf* open(open_handle_type handle, std::ios::openmode mode);
3333
};
3434
} // namespace tmp
3535

src/create.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ const wchar_t* make_mdstring(std::ios::openmode mode) noexcept {
119119

120120
/// Closes the given handle, ignoring any errors
121121
/// @param[in] handle The handle to close
122-
void close(filebuf::native_handle_type handle) noexcept {
122+
void close(filebuf::open_handle_type handle) noexcept {
123123
#ifdef _WIN32
124124
fclose(handle);
125125
#else

src/filebuf.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
namespace tmp {
1010

11-
filebuf* filebuf::open(native_handle_type handle, std::ios::openmode mode) {
11+
filebuf* filebuf::open(open_handle_type handle, std::ios::openmode mode) {
1212
#if defined(_LIBCPP_VERSION)
1313
return this->__open(handle, mode) != nullptr ? this : nullptr;
1414
#elif defined(__GLIBCXX__)

0 commit comments

Comments
 (0)