PostGIS  3.4.0dev-r@@SVN_REVISION@@

◆ AddPrepGeomHashEntry()

static void AddPrepGeomHashEntry ( PrepGeomHashEntry  pghe)
static

Definition at line 151 of file lwgeom_geos_prepared.c.

152 {
153  bool found;
154  void **key;
155  PrepGeomHashEntry *he;
156 
157  /* The hash key is the MemoryContext pointer */
158  key = (void *)&(pghe.context);
159 
160  he = (PrepGeomHashEntry *) hash_search(PrepGeomHash, key, HASH_ENTER, &found);
161  if (!found)
162  {
163  /* Insert the entry into the new hash element */
164  he->context = pghe.context;
165  he->geom = pghe.geom;
166  he->prepared_geom = pghe.prepared_geom;
167  }
168  else
169  {
170  elog(ERROR, "AddPrepGeomHashEntry: This memory context is already in use! (%p)", (void *)pghe.context);
171  }
172 }
static HTAB * PrepGeomHash
const GEOSGeometry * geom
const GEOSPreparedGeometry * prepared_geom

References PrepGeomHashEntry::context, PrepGeomHashEntry::geom, PrepGeomHashEntry::prepared_geom, and PrepGeomHash.

Referenced by PrepGeomCacheBuilder().

Here is the caller graph for this function: