summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-12-03 10:22:17 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-12-03 10:22:17 +0100
commit1b2bb5077e9e9deac60a3e92e742465e7bcd3a21 (patch)
treef6ce6b763307f220f2f879dd8cfcbe641b2682f2 /src
parent756a43689324b473ee07549a6eb7a53a203df5ad (diff)
Change Pointer to void *
The comment for the Pointer type said 'XXX Pointer arithmetic is done with this, so it can't be void * under "true" ANSI compilers.'. This has been fixed in the previous commit 756a4368932. This now changes the definition of the type from char * to void *, as envisaged by that comment. Extension code that relies on using Pointer for pointer arithmetic will need to make changes similar to commit 756a4368932, but those changes would be backward compatible. Reviewed-by: Chao Li <li.evan.chao@gmail.com> Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Discussion: https://www.postgresql.org/message-id/4154950a-47ae-4223-bd01-1235cc50e933%40eisentraut.org
Diffstat (limited to 'src')
-rw-r--r--src/include/c.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/include/c.h b/src/include/c.h
index a40f0cf4642..ccd2b654d45 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -527,11 +527,9 @@ typedef void (*pg_funcptr_t) (void);
/*
* Pointer
* Variable holding address of any memory resident object.
- *
- * XXX Pointer arithmetic is done with this, so it can't be void *
- * under "true" ANSI compilers.
+ * (obsolescent; use void * or char *)
*/
-typedef char *Pointer;
+typedef void *Pointer;
/* Historical names for types in <stdint.h>. */
typedef int8_t int8;