aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2019-08-13 10:11:47 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2019-08-13 10:11:47 +0800
commitb84d0c7fe0e549a7f708f5177b9467c670df3eae (patch)
tree6d379f91a8448e8bbad33a3bf38cd393fddf0d49
parenta6cab0b3856b2ea81a3be7788b9a85be6f48b590 (diff)
downloadtangerine-mcl-b84d0c7fe0e549a7f708f5177b9467c670df3eae.tar.gz
tangerine-mcl-b84d0c7fe0e549a7f708f5177b9467c670df3eae.tar.zst
tangerine-mcl-b84d0c7fe0e549a7f708f5177b9467c670df3eae.zip
dump() accepts const void*
-rw-r--r--include/mcl/op.hpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/mcl/op.hpp b/include/mcl/op.hpp
index a8b47e5..8011984 100644
--- a/include/mcl/op.hpp
+++ b/include/mcl/op.hpp
@@ -366,10 +366,11 @@ inline const char* getIoSeparator(int ioMode)
return (ioMode & (IoArray | IoArrayRaw | IoSerialize | IoSerializeHexStr)) ? "" : " ";
}
-inline void dump(const char *s, size_t n)
+inline void dump(const void *buf, size_t n)
{
+ const uint8_t *s = (const uint8_t *)buf;
for (size_t i = 0; i < n; i++) {
- printf("%02x ", (uint8_t)s[i]);
+ printf("%02x ", s[i]);
}
printf("\n");
}