mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-26 19:03:43 +03:00
Dropped import of postgres internal/c.h
Stops warning (caused by command line definition of PG_VERSION, so it could have been avoided otherwise), but the file comment says: Note that the definitions here are not intended to be exposed to clients of the frontend interface libraries --- so we don't worry much about polluting the namespace with lots of stuff... so it doesn't seem a good idea gulping it.
This commit is contained in:
parent
86434548a7
commit
12ecb4b2ce
|
@ -26,10 +26,10 @@
|
||||||
#define PSYCOPG_LIBPQ_SUPPORT_H 1
|
#define PSYCOPG_LIBPQ_SUPPORT_H 1
|
||||||
|
|
||||||
#include "psycopg/config.h"
|
#include "psycopg/config.h"
|
||||||
#include "internal/c.h"
|
|
||||||
|
|
||||||
/* type and constant definitions from internal postgres includes not available otherwise */
|
/* type and constant definitions from internal postgres include */
|
||||||
typedef unsigned PG_INT64_TYPE XLogRecPtr;
|
typedef unsigned PG_INT64_TYPE XLogRecPtr;
|
||||||
|
typedef uint32_t uint32;
|
||||||
|
|
||||||
/* have to use lowercase %x, as PyString_FromFormat can't do %X */
|
/* have to use lowercase %x, as PyString_FromFormat can't do %X */
|
||||||
#define XLOGFMTSTR "%x/%x"
|
#define XLOGFMTSTR "%x/%x"
|
||||||
|
|
|
@ -49,9 +49,10 @@ static PyObject *
|
||||||
replmsg_repr(replicationMessageObject *self)
|
replmsg_repr(replicationMessageObject *self)
|
||||||
{
|
{
|
||||||
return PyString_FromFormat(
|
return PyString_FromFormat(
|
||||||
"<ReplicationMessage object at %p; data_size: %d; data_start: "XLOGFMTSTR"; wal_end: "XLOGFMTSTR"; send_time: " INT64_FORMAT ">",
|
"<ReplicationMessage object at %p; data_size: %d; "
|
||||||
|
"data_start: "XLOGFMTSTR"; wal_end: "XLOGFMTSTR"; send_time: %ld>",
|
||||||
self, self->data_size, XLOGFMTARGS(self->data_start), XLOGFMTARGS(self->wal_end),
|
self, self->data_size, XLOGFMTARGS(self->data_start), XLOGFMTARGS(self->wal_end),
|
||||||
self->send_time);
|
(long int)self->send_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
Loading…
Reference in New Issue
Block a user