PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ AddPrepGeomHashEntry()

static void AddPrepGeomHashEntry ( PrepGeomHashEntry  pghe)
static

Definition at line 226 of file lwgeom_geos_prepared.c.

227 {
228  bool found;
229  void **key;
230  PrepGeomHashEntry *he;
231 
232  /* The hash key is the MemoryContext pointer */
233  key = (void *)&(pghe.context);
234 
235  he = (PrepGeomHashEntry *) hash_search(PrepGeomHash, key, HASH_ENTER, &found);
236  if (!found)
237  {
238  /* Insert the entry into the new hash element */
239  he->context = pghe.context;
240  he->geom = pghe.geom;
241  he->prepared_geom = pghe.prepared_geom;
242  }
243  else
244  {
245  elog(ERROR, "AddPrepGeomHashEntry: This memory context is already in use! (%p)", (void *)pghe.context);
246  }
247 }
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: