mirror of
https://github.com/DoubleLabyrinth/navicat-keygen.git
synced 2019-12-02 05:10:56 +00:00
Add CapstoneMallocTraits
This commit is contained in:
@@ -6,10 +6,19 @@
|
||||
struct CapstoneHandleTraits {
|
||||
using HandleType = csh;
|
||||
static inline const HandleType InvalidValue = 0;
|
||||
static inline void Releasor(csh Handle) {
|
||||
static inline void Releasor(HandleType Handle) {
|
||||
cs_close(&Handle);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename __Type>
|
||||
struct CapstoneMallocTraits {
|
||||
using HandleType = __Type*;
|
||||
static inline const HandleType InvalidValue = nullptr;
|
||||
static inline void Releasor(HandleType Handle) {
|
||||
cs_free(Handle, 1);
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user