File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -279,6 +279,30 @@ namespace snmalloc
279279 }
280280 }
281281
282+ /*
283+ * TODO: This is not quite the right thing we want to check, but it
284+ * suffices on all currently-supported platforms and CHERI. We'd rather
285+ * compare UINTPTR_WIDTH and ULLONG_WIDTH, I think, but those don't
286+ * exist until C's FP Ext 1 TS (merged into C2x).
287+ */
288+ #ifdef __CHERI_PURE_CAPABILITY__
289+ /* *
290+ * Append an intptr_t to the buffer as a hex string
291+ */
292+ void append (intptr_t v)
293+ {
294+ append (reinterpret_cast <void *>(v));
295+ }
296+
297+ /* *
298+ * Append a uintptr_t to the buffer as a hex string
299+ */
300+ void append (uintptr_t v)
301+ {
302+ append (reinterpret_cast <void *>(v));
303+ }
304+ #endif
305+
282306 /* *
283307 * Append a raw pointer to the buffer as a hex string.
284308 */
You can’t perform that action at this time.
0 commit comments