mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-30 11:30:37 +00:00
Use XLogRecPtr for LSNs in C generated code.
This hopefully silences the static assertion Erik is seeing:
```
pgxn/neon/communicator_new.c:1352:9: error: static assertion failed due to requirement '__builtin_types_compatible_p(unsigned long long, unsigned long)': (r->lsn) does not have type XLogRecPtr
1352 | LSN_FORMAT_ARGS(r->lsn));
| ^~~~~~~~~~~~~~~~~~~~~~~
```
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
pub type CLsn = u64;
|
||||
|
||||
// Definitions of some core PostgreSQL datatypes.
|
||||
|
||||
/// XLogRecPtr is defined in "access/xlogdefs.h" as:
|
||||
///
|
||||
/// ```
|
||||
/// typedef uint64 XLogRecPtr;
|
||||
/// ```
|
||||
/// cbindgen:no-export
|
||||
pub type XLogRecPtr = u64;
|
||||
|
||||
pub type CLsn = XLogRecPtr;
|
||||
pub type COid = u32;
|
||||
|
||||
// This conveniently matches PG_IOV_MAX
|
||||
|
||||
Reference in New Issue
Block a user