Logo Search packages:      
Sourcecode: csound version File versions  Download package

PUBLIC void* csoundQueryGlobalVariableNoCheck ( CSOUND *  csnd,
const char *  name 
)

This function is the same as csoundQueryGlobalVariable(), except the variable is assumed to exist and no error checking is done. Faster, but may crash or return an invalid pointer if 'name' is not defined.

Definition at line 947 of file namedins.c.

{
    GlobalVariableEntry_t *p;
    unsigned char         h;

    /* calculate hash value */
    h = name_hash_2(csnd, name);
    /* search tree */
    p = (GlobalVariableEntry_t*) (csnd->namedGlobals[(int) h]);
    if (!p) {
      return 0;
    }
    while (p->nxt != NULL && sCmp(name, (char*) (p->name)) != 0)
      p = (GlobalVariableEntry_t*) p->nxt;
    return (void*) (p->p);
}


Generated by  Doxygen 1.6.0   Back to index