From f8fec9b5f0bb8cbc8d208cc4c21a1e7d46671ccc Mon Sep 17 00:00:00 2001 From: sisong Date: Fri, 9 Apr 2021 19:57:56 +0800 Subject: [PATCH] hpatch head code to C --- android/jni/hpatch.h | 6 ++++++ ios/RCTPushy/HDiffPatch/HDiffPatch.m | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/android/jni/hpatch.h b/android/jni/hpatch.h index 516df4a..9215b64 100644 --- a/android/jni/hpatch.h +++ b/android/jni/hpatch.h @@ -6,6 +6,9 @@ #define HDIFFPATCH_PATCH_H # include //for uint8_t #include "HDiffPatch/libHDiffPatch/HPatch/patch_types.h" //for hpatch_singleCompressedDiffInfo +#ifdef __cplusplus +extern "C" { +#endif //result enum { @@ -35,4 +38,7 @@ int hpatch_by_mem(const uint8_t* old,size_t oldsize, uint8_t* newBuf,size_t news const uint8_t* pat,size_t patsize,const hpatch_singleCompressedDiffInfo* patInfo); int hpatch_by_file(const char* oldfile, const char* newfile, const char* patchfile); +#ifdef __cplusplus +} +#endif #endif //HDIFFPATCH_PATCH_H \ No newline at end of file diff --git a/ios/RCTPushy/HDiffPatch/HDiffPatch.m b/ios/RCTPushy/HDiffPatch/HDiffPatch.m index faf50d7..231d2da 100644 --- a/ios/RCTPushy/HDiffPatch/HDiffPatch.m +++ b/ios/RCTPushy/HDiffPatch/HDiffPatch.m @@ -1,5 +1,5 @@ // -// BSDiff.m +// HDiffPatch.m // RCTPushy // // Created by HouSisong, All rights reserved.