[postgis-tickets] [PostGIS] #3830: PostgreSQL-10: initialization from incompatible pointer type
PostGIS
trac at osgeo.org
Tue Sep 5 21:28:45 PDT 2017
#3830: PostgreSQL-10: initialization from incompatible pointer type
----------------------------------+---------------------------
Reporter: strk | Owner: robe
Type: defect | Status: new
Priority: high | Milestone: PostGIS 2.4.0
Component: pagc_address_parser | Version: trunk
Resolution: | Keywords:
----------------------------------+---------------------------
Comment (by robe):
okay I have to double-check why I wasn't seeing it in 9.6 anymore.
The issue is caused because they changed the stats argument in
MemoryContextMethods between 9.5 and 9.6.
So in 9.5 -
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/memnodes.h;h=5e036b9b6f5dc892b8947caef2c91cc32bcc4874;hb=refs/heads/REL9_5_STABLE#l36
it looked like
{{{
36 typedef struct MemoryContextMethods
37 {
38 void *(*alloc) (MemoryContext context, Size size);
39 /* call this free_p in case someone #define's free() */
40 void (*free_p) (MemoryContext context, void *pointer);
41 void *(*realloc) (MemoryContext context, void *pointer,
Size size);
42 void (*init) (MemoryContext context);
43 void (*reset) (MemoryContext context);
44 void (*delete_context) (MemoryContext context);
45 Size (*get_chunk_space) (MemoryContext context, void
*pointer);
46 bool (*is_empty) (MemoryContext context);
47 void (*stats) (MemoryContext context, int level);
48 #ifdef MEMORY_CONTEXT_CHECKING
49 void (*check) (MemoryContext context);
50 #endif
51 } MemoryContextMethods;
52
}}}
In 9.6 it changed to:
https://git.postgresql.org/gitweb/?p=postgresql.git;a=blob;f=src/include/nodes/memnodes.h;h=ba069cc130e818b70e5383b28847d6629c82f453;hb=refs/heads/REL9_6_STABLE#l53
{{{
54 typedef struct MemoryContextMethods
55 {
56 void *(*alloc) (MemoryContext context, Size size);
57 /* call this free_p in case someone #define's free() */
58 void (*free_p) (MemoryContext context, void *pointer);
59 void *(*realloc) (MemoryContext context, void *pointer,
Size size);
60 void (*init) (MemoryContext context);
61 void (*reset) (MemoryContext context);
62 void (*delete_context) (MemoryContext context);
63 Size (*get_chunk_space) (MemoryContext context, void
*pointer);
64 bool (*is_empty) (MemoryContext context);
65 void (*stats) (MemoryContext context, int level, bool
print,
66 MemoryContextCounters *totals);
67 #ifdef MEMORY_CONTEXT_CHECKING
68 void (*check) (MemoryContext context);
69 #endif
70 } MemoryContextMethods;
}}}
note the addition of bool print, and MemoryContextCounters.
anyrate I'll fix this for 2.4, but I ain't backporting it don't care don't
care all 9.6 and 10 users should be using 2.4
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3830#comment:6>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list