salortiz / LMDB_File

Perl wrapper around the OpenLDAP's LMDB
Other
8 stars 12 forks source link

Any way to use pure C comparison callback? #13

Open hoytech opened 8 years ago

hoytech commented 8 years ago

I think being able to do $DB->set_compare(sub {}) is a really neat feature, thanks for getting that working!

However, some of my comparison functions could be implemented a lot more efficiently with a simple C function instead of a perl callback. I could make an XS module return a bare function pointer in an SV, is there an easy way to install that with mdb_set_compare, or some other way to accomplish this?

Thanks!