byzhang / leveldb

Automatically exported from code.google.com/p/leveldb
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

No corresponding filter free function for C API leveldb_filterpolicy_create::create_filter #185

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

There should be a free function provided by the library. When leveldb is build 
as a shared library, the consumer of this library could be built by any other 
compile with its own free() function.

I would like to suggest add a new free_filter callback argument for 
leveldb_filterpolicy_create:

extern leveldb_filterpolicy_t* leveldb_filterpolicy_create( void* state, void (destructor)(void), char* (_createfilter)( void, const char* const* key_array, const size_t* key_length_array, int num_keys, size_t* filter_length), void (_freefilter)(void), unsigned char (_key_maymatch)( void, const char* key, size_t length, const char* filter, size_t filter_length), const char* (name)(void));


What version of the product are you using? On what operating system?

1.12.0 on all platforms

Please provide any additional information below.

Original issue reported on code.google.com by chaishus...@gmail.com on 7 Jul 2013 at 2:17

Attachments: