95 if (str->
data == NULL)
187 if (needed >= ((
size_t) INT_MAX - str->
len))
193 needed += str->
len + 1;
197 if (needed <= str->maxlen)
206 while (needed > newlen)
214 if (newlen > (
size_t) INT_MAX)
215 newlen = (
size_t) INT_MAX;
239 int save_errno = errno;
269 int save_errno = errno;
322 if ((
size_t) nprinted < avail)
325 str->
len += nprinted;
337 if (
unlikely(nprinted > INT_MAX - 1))
342 needed = nprinted + 1;
406 memcpy(str->
data + str->
len, data, datalen);
void printfPQExpBuffer(PQExpBuffer str, const char *fmt,...)
static bool static void markPQExpBufferBroken(PQExpBuffer str)
PQExpBufferData * PQExpBuffer
void termPQExpBuffer(PQExpBuffer str)
void appendPQExpBufferStr(PQExpBuffer str, const char *data)
#define pg_attribute_printf(f, a)
void destroyPQExpBuffer(PQExpBuffer str)
static const char oom_buffer[1]
void appendPQExpBuffer(PQExpBuffer str, const char *fmt,...)
#define unconstify(underlying_type, expr)
PQExpBuffer createPQExpBuffer(void)
void appendPQExpBufferChar(PQExpBuffer str, char ch)
#define PQExpBufferBroken(str)
static const char * oom_buffer_ptr
void resetPQExpBuffer(PQExpBuffer str)
void appendBinaryPQExpBuffer(PQExpBuffer str, const char *data, size_t datalen)
void initPQExpBuffer(PQExpBuffer str)
static bool appendPQExpBufferVA(PQExpBuffer str, const char *fmt, va_list args) pg_attribute_printf(2
#define INITIAL_EXPBUFFER_SIZE
int enlargePQExpBuffer(PQExpBuffer str, size_t needed)