couchbase / forestdb

A Fast Key-Value Storage Engine Based on Hierarchical B+-Tree Trie
Apache License 2.0
1.29k stars 172 forks source link

Add 'const' qualifiers in API #1

Closed snej closed 10 years ago

snej commented 10 years ago

In the public API in forestdb.h, please add the const qualifier to function parameters that take pointers but do not modify the memory pointed to. For example,

fdb_status fdb_open(fdb_handle *handle, char *filename, fdb_config *config);

should be

fdb_status fdb_open(fdb_handle *handle, const char *filename, const fdb_config *config);
chiyoung commented 10 years ago

This issue was fixed by adapting fdb_open API, so that a config JSON doc is passed to fdb_open API.