github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/database/leveldb/comparator.go (about)

     1  // Copyright 2013 <chaishushan{AT}gmail.com>. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package leveldb
     6  
     7  // #include <leveldb/c.h>
     8  import "C"
     9  
    10  // DestroyComparator deallocates a *C.leveldb_comparator_t.
    11  //
    12  // This is provided as a convienience to advanced users that have implemented
    13  // their own comparators in C in their own code.
    14  func DestroyComparator(cmp *C.leveldb_comparator_t) {
    15  	C.leveldb_comparator_destroy(cmp)
    16  }