Skip to content

Commit

Permalink
Use the new Pex_Fingerprint_* functions instead of the *_For_Types on…
Browse files Browse the repository at this point in the history
…es (#41)

Previously we had e.g. Pex_Fingerprint_File and
Pex_Fingerprint_File_For_Types functions and since Pex_Fingerprint_File
was unused we replaced it's implementation with the one from *_For_Types
and got rid of that one.
  • Loading branch information
stepanbujnak authored Oct 30, 2023
1 parent 5c6aebd commit fa29dbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fingerprint.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func newFingerprint(input []byte, isFile bool, typ FingerprintType) (*Fingerprin
cFile := C.CString(string(input))
defer C.free(unsafe.Pointer(cFile))

C.Pex_Fingerprint_File_For_Types(cFile, ft, status, C.int(typ))
C.Pex_Fingerprint_File(cFile, ft, status, C.int(typ))
} else {
buf := C.Pex_Buffer_New()
if buf == nil {
Expand All @@ -97,7 +97,7 @@ func newFingerprint(input []byte, isFile bool, typ FingerprintType) (*Fingerprin
size := C.size_t(len(input))

C.Pex_Buffer_Set(buf, data, size)
C.Pex_Fingerprint_Buffer_For_Types(buf, ft, status, C.int(typ))
C.Pex_Fingerprint_Buffer(buf, ft, status, C.int(typ))
}

if err := statusToError(status); err != nil {
Expand Down

0 comments on commit fa29dbe

Please sign in to comment.