PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void AddPrepGeomHashEntry ( PrepGeomHashEntry  pghe)
static

Definition at line 211 of file lwgeom_geos_prepared.c.

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

Referenced by PrepGeomCacheBuilder().

212 {
213  bool found;
214  void **key;
215  PrepGeomHashEntry *he;
216 
217  /* The hash key is the MemoryContext pointer */
218  key = (void *)&(pghe.context);
219 
220  he = (PrepGeomHashEntry *) hash_search(PrepGeomHash, key, HASH_ENTER, &found);
221  if (!found)
222  {
223  /* Insert the entry into the new hash element */
224  he->context = pghe.context;
225  he->geom = pghe.geom;
226  he->prepared_geom = pghe.prepared_geom;
227  }
228  else
229  {
230  elog(ERROR, "AddPrepGeomHashEntry: This memory context is already in use! (%p)", (void *)pghe.context);
231  }
232 }
const GEOSPreparedGeometry * prepared_geom
const GEOSGeometry * geom
static HTAB * PrepGeomHash

Here is the caller graph for this function: