Skip to content

Commit ceeeaa6

Browse files
committed
Corrected some functions for v16
1 parent 34430a5 commit ceeeaa6

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

tests/cmocka/missing_basic.c

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,29 @@ pfree(void *pointer)
2424

2525
void
2626
ExceptionalCondition(const char *conditionName,
27+
#if PG_VERSION_NUM < 160000
2728
const char *errorType,
29+
#endif
2830
const char *fileName,
2931
int lineNumber)
3032
{
31-
if (!PointerIsValid(conditionName) ||
32-
!PointerIsValid(fileName) ||
33-
!PointerIsValid(errorType))
33+
if (!PointerIsValid(conditionName) || !PointerIsValid(fileName)
34+
#if PG_VERSION_NUM < 160000
35+
|| !PointerIsValid(errorType)
36+
#endif
37+
)
3438
{
3539
printf("TRAP: ExceptionalCondition: bad arguments\n");
3640
}
3741
else
3842
{
3943
printf("TRAP: %s(\"%s\", File: \"%s\", Line: %d)\n",
40-
errorType, conditionName,
44+
#if PG_VERSION_NUM < 160000
45+
errorType,
46+
#else
47+
"",
48+
#endif
49+
conditionName,
4150
fileName, lineNumber);
4251

4352
}

tests/cmocka/missing_stringinfo.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,13 @@ appendStringInfoSpaces(StringInfo str, int count)
206206
* if necessary.
207207
*/
208208
void
209-
appendBinaryStringInfo(StringInfo str, const char *data, int datalen)
209+
appendBinaryStringInfo(StringInfo str,
210+
#if PG_VERSION_NUM < 160000
211+
const char *data,
212+
#else
213+
const void *data,
214+
#endif
215+
int datalen)
210216
{
211217
Assert(str != NULL);
212218

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy