MCPcopy Create free account
hub / github.com/crawl/crawl / _database_fetch

Function _database_fetch

crawl-ref/source/database.cc:358–373  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356// Main DB functions
357
358static datum _database_fetch(DBM *database, const string &key)
359{
360 datum result;
361 result.dptr = nullptr;
362 result.dsize = 0;
363 datum dbKey;
364
365 dbKey.dptr = (DPTR_COERCE) key.c_str();
366 dbKey.dsize = key.length();
367
368 // Don't use the database if called from "monster".
369 if (database)
370 result = dbm_fetch(database, dbKey);
371
372 return result;
373}
374
375static vector<string> _database_find_keys(DBM *database,
376 const string &regex,

Callers 2

_getWeightedStringFunction · 0.85
_query_databaseFunction · 0.85

Calls 1

dbm_fetchFunction · 0.85

Tested by

no test coverage detected