Ejemplo n.º 1
0
/* Lookup file handler */
static struct corto_fileHandler* corto_lookupExt(corto_string ext) {
    struct corto_fileHandler dummy, *dummy_p;

    dummy.ext = ext;
    dummy_p = &dummy;

    /* Walk handlers */
    if (fileHandlers) {
        corto_ll_walk(fileHandlers, (corto_elementWalk_cb)corto_lookupExtWalk, &dummy_p);
    }

    if (dummy_p == &dummy) {
        dummy_p = NULL;
    }

    return dummy_p;
}
Ejemplo n.º 2
0
/* Free index */
void corto_string_deserFreeIndex(corto_string_deser_t* data) {
    if (data->index) {
        corto_ll_walk(data->index, corto_string_deserWalkIndex, NULL);
        corto_ll_free(data->index);
    }
}