mirror of
https://github.com/simon987/fastimagehash-go.git
synced 2025-12-15 23:29:03 +00:00
Add LibVersion string
This commit is contained in:
@@ -13,6 +13,8 @@ import (
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
const char* Version = FASTIMAGEHASH_VERSION;
|
||||
|
||||
char *hash_to_hex_string_reversed_wr(void *h, int size) {
|
||||
char *out = malloc(size * 2 + 1);
|
||||
hash_to_hex_string_reversed((uchar*)h, out, size);
|
||||
@@ -100,6 +102,8 @@ type MultiHash struct {
|
||||
MHash Hash
|
||||
}
|
||||
|
||||
var LibVersion = C.GoString(C.Version)
|
||||
|
||||
func retHash(hash *C.uchar, hashSize int, ret C.int) (*Hash, Code) {
|
||||
if ret == Ok {
|
||||
goHash := C.GoBytes(unsafe.Pointer(hash), C.int(hashSize))
|
||||
|
||||
Reference in New Issue
Block a user