PostGIS  2.2.7dev-r@@SVN_REVISION@@
static int guc_find_option ( const char *  name)
static

Definition at line 160 of file lwgeom_backend_api.c.

References guc_var_compare(), and window::res.

Referenced by lwgeom_init_backend().

161 {
162  const char **key = &name;
163  struct config_generic **res;
164 
165  /*
166  * By equating const char ** with struct config_generic *, we are assuming
167  * the name field is first in config_generic.
168  */
169  res = (struct config_generic **) bsearch((void *) &key,
170  (void *) get_guc_variables(),
171  GetNumConfigOptions(),
172  sizeof(struct config_generic *),
174 
175  /* Found nothing? Good */
176  if ( ! res ) return 0;
177 
178  /* Hm, you found something, but maybe it's just a placeholder? */
179  /* We'll consider a placehold a "not found" */
180  if ( (*res)->flags & GUC_CUSTOM_PLACEHOLDER )
181  return 0;
182 
183  return 1;
184 }
tuple res
Definition: window.py:78
static int guc_var_compare(const void *a, const void *b)

Here is the call graph for this function:

Here is the caller graph for this function: