Add 32-bit support, i.e. libdeepstate32

This commit is contained in:
Peter Goodman
2017-12-13 21:53:33 -05:00
parent f4dd61f895
commit 7c585f5c44
4 changed files with 30 additions and 10 deletions

View File

@@ -196,13 +196,13 @@ void _DeepState_StreamString(enum DeepState_LogLevel level, const char *format,
stream->size += size;
}
void DeepState_StreamPointer(enum DeepState_LogLevel level, void * val) {
void DeepState_StreamPointer(enum DeepState_LogLevel level, void *val) {
struct DeepState_Stream *stream = &(DeepState_Streams[level]);
stream->format[0] = '%';
stream->format[1] = 'p';
stream->format[2] = '\0';
DeepState_StreamUnpack(stream, (sizeof(void *) == 8 ? 'Q' : 'I'));
stream->value.as_uint64 = (uint64_t) val;
stream->value.as_uint64 = (uintptr_t) val;
_DeepState_StreamInt(level, stream->format, stream->unpack,
&(stream->value.as_uint64));
}