Skip to content
Extraits de code Groupes Projets
Vérifiée Valider dae57460 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

DOC: Add todo to not forget

parent 8ab4c60b
Branches
Étiquettes
1 requête de fusion!157Caching for karas & refactor & others
......@@ -79,7 +79,8 @@ database_cache_kara(volatile sqlite3 *db, int id)
LOG_INFO("CACHE", "Cached mtime %ld and duration %ld for '%s' kara %ld", mtime, duration_uint, filepath, id);
}
#pragma message(TODO "Create a cache at the 'get' level and populate it with the next `N` karas")
#pragma message(TODO "Cache the 'get' with the next `N` karas. Use static __thread variables for that.")
#pragma message(TODO "Add private 'packed' get for cache values")
/* Cache and retry if the kara was not present in the cache */
#define ___cache_and_retry(what, pointer) \
......
......@@ -142,12 +142,14 @@ database_queue_current_kara(volatile sqlite3 *db, struct kara_metadata *res, int
Most of the time it won't be NULL. */
if (!res)
goto no_metadata;
// clang-format off
strncpy(res->song_name, sqlite3_column_chars(stmt, 0), LEKTOR_TAG_MAX - 1);
strncpy(res->source_name, sqlite3_column_chars(stmt, 1), LEKTOR_TAG_MAX - 1);
strncpy(res->category, sqlite3_column_chars(stmt, 2), LEKTOR_TAG_MAX - 1);
strncpy(res->language, sqlite3_column_chars(stmt, 3), LEKTOR_TAG_MAX - 1);
strncpy(res->author_name, sqlite3_column_chars(stmt, 4), LEKTOR_TAG_MAX - 1);
strncpy(res->song_type, sqlite3_column_chars(stmt, 5), LEKTOR_TAG_MAX - 1);
// clang-format on
res->song_number = sqlite3_column_int(stmt, 6);
no_metadata:
/* Most of the time this will be NULL. */
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter