[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 064c033: Don't recite prototypes that are alr
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 064c033: Don't recite prototypes that are already given in a header |
Date: |
Wed, 17 Feb 2021 16:20:49 -0500 (EST) |
branch: master
commit 064c033822f2841939b3a24d0449aeed047d06cf
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Don't recite prototypes that are already given in a header
The reason for reciting them was to document their parameters.
It's okay to do that iff the whole prototype is in a comment.
---
unwind.cpp | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/unwind.cpp b/unwind.cpp
index e9c9500..ad62d71 100644
--- a/unwind.cpp
+++ b/unwind.cpp
@@ -49,12 +49,12 @@
# pragma GCC diagnostic ignored "-Wold-style-cast"
#endif // defined __GNUC__
-// ABI:
-extern "C" void __cxa_throw
- (void* thrown_exception // exception address
- ,struct std::type_info* tinfo // exception type
- ,void (*dest)(void*) // exception destructor
- );
+// For reference, the ABI specifies this prototype:
+// extern "C" void __cxa_throw
+// (void* thrown_exception // exception address
+// ,struct std::type_info* tinfo // exception type
+// ,void (*dest)(void*) // exception destructor
+// );
using cxa_throw_t = void (*)(void*, std::type_info*, void (*)(void*));
using cxa_rethrow_t = void (*)();
@@ -63,13 +63,13 @@ cxa_throw_t original_cxa_throw = (cxa_throw_t)
dlsym(RTLD_NEXT, "__cxa_thr
// Not yet used:
cxa_rethrow_t original_cxa_rethrow = (cxa_rethrow_t) dlsym(RTLD_NEXT,
"__cxa_rethrow");
-// ABI:
-extern "C" char* __cxa_demangle
- (char const * mangled_name // mangled name, NUL-terminated
- ,char * output_buffer // just use 0
- ,std::size_t* length // just use 0
- ,int * status // zero --> success
- );
+// For reference, the ABI specifies this prototype:
+// extern "C" char* __cxa_demangle
+// (char const * mangled_name // mangled name, NUL-terminated
+// ,char * output_buffer // just use 0
+// ,std::size_t* length // just use 0
+// ,int * status // zero --> success
+// );
/// Print type of exception, and what() if it's a std::exception.
///
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master 064c033: Don't recite prototypes that are already given in a header,
Greg Chicares <=