Skip to content

Commit 35196ff

Browse files
committed
compat/c23: drop nullptr_t
and do not use in rxtx.h compat GCC 16 on MinGW with ucrt64 env defines nullptr but doesn't nullptr_t in stddef.h. As per c23 standard, nullptr_t is defined as `typedef typeof_unqual(nullptr)` but typeof is not supported in older compilers (eg. since gcc < 13) so the compat may introduce problems on contrary on eg gcc 11.
1 parent e8a5fd4 commit 35196ff

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

src/compat/c23.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#if __STDC_VERSION__ < 202311L
5555
#include <stddef.h>
5656
#define nullptr NULL
57-
typedef void *nullptr_t;
5857
#endif
5958

6059
// countof

src/rxtx.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ typedef struct rx_audio_frames *rxtx_recv_audio_frame_fn(void *state);
162162
typedef void rxtx_send_shr_ptr_video_frame_fn(void *state,
163163
std::shared_ptr<video_frame>);
164164
#else
165-
typedef nullptr_t rxtx_send_shr_ptr_video_frame_fn;
165+
typedef void *rxtx_send_shr_ptr_video_frame_fn;
166166
#endif // defined __cplusplus
167167
/**
168168
* @param f f->callbacks.dispose(f) must be called

0 commit comments

Comments
 (0)