diff --git a/src/leveldb/helpers/memenv/memenv.h b/src/leveldb/helpers/memenv/memenv.h index ab5bde1..cba7a10 100644 --- a/src/leveldb/helpers/memenv/memenv.h +++ b/src/leveldb/helpers/memenv/memenv.h @@ -2,6 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. See the AUTHORS file for names of contributors. -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS -#endif +#ifndef STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H__STDC_LIMIT_MACROS +#define STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H__STDC_LIMIT_MACROS + +namespace leveldb { + +class Env; + +// Returns a new environment that stores its data in memory and delegates +// all non-file-storage tasks to base_env. The caller must delete the result +// when it is no longer needed. +// *base_env must remain live while the result is in use. +Env* NewMemEnv(Env* base_env); + +} // namespace leveldb + +#endif // STORAGE_LEVELDB_HELPERS_MEMENV_MEMENV_H_