diff options
author | Lei Zhang <thestig@chromium.org> | 2017-11-03 22:18:18 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-03 22:18:18 +0000 |
commit | b810da2788d0aca491bee55b0f9d97b48e682bbf (patch) | |
tree | 5bc3c77f1fc0945b6db71c62f9f347ff3dc1e398 /third_party | |
parent | 882a190807b6f791e3b3f1a692c59fb93d746f94 (diff) | |
download | pdfium-b810da2788d0aca491bee55b0f9d97b48e682bbf.tar.xz |
Remove flags param from FXMEM_DefaultAlloc() and friends.
Change-Id: I24404be0065156a1cfdec31bafdf72c27fa70142
Reviewed-on: https://pdfium-review.googlesource.com/17792
Reviewed-by: Chris Palmer <palmer@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/lcms/0000-cmserr-changes.patch | 10 | ||||
-rw-r--r-- | third_party/lcms/src/cmserr.c | 10 | ||||
-rw-r--r-- | third_party/libpng16/0000-build-config.patch | 8 | ||||
-rw-r--r-- | third_party/libpng16/pngmem.c | 8 |
4 files changed, 18 insertions, 18 deletions
diff --git a/third_party/lcms/0000-cmserr-changes.patch b/third_party/lcms/0000-cmserr-changes.patch index 5ccaac9ee1..baf35772a0 100644 --- a/third_party/lcms/0000-cmserr-changes.patch +++ b/third_party/lcms/0000-cmserr-changes.patch @@ -51,7 +51,7 @@ index 700152ee3..3c3848b2a 100644 +// Generic allocate +void* CMSEXPORT _cmsMalloc(cmsContext ContextID, cmsUInt32Number size) +{ -+ return FXMEM_DefaultAlloc(size, 1); ++ return FXMEM_DefaultAlloc(size); } // Generic allocate & zero @@ -64,7 +64,7 @@ index 700152ee3..3c3848b2a 100644 - - memset(pt, 0, size); - return pt; -+ void* p = FXMEM_DefaultAlloc(size, 1); ++ void* p = FXMEM_DefaultAlloc(size); + if (p) memset(p, 0, size); + return p; } @@ -101,7 +101,7 @@ index 700152ee3..3c3848b2a 100644 - return realloc(Ptr, size); - - cmsUNUSED_PARAMETER(ContextID); -+ return FXMEM_DefaultRealloc(Ptr, size, 1); ++ return FXMEM_DefaultRealloc(Ptr, size); } - @@ -128,7 +128,7 @@ index 700152ee3..3c3848b2a 100644 - if (Total > MAX_MEMORY_FOR_ALLOC) return NULL; // Never alloc over 512Mb - - return _cmsMallocZero(ContextID, Total); -+ if (Ptr != NULL) FXMEM_DefaultFree(Ptr, 0); ++ if (Ptr != NULL) FXMEM_DefaultFree(Ptr); } // Generic block duplication @@ -146,7 +146,7 @@ index 700152ee3..3c3848b2a 100644 - memmove(mem, Org, size); - - return mem; -+ void* p = FXMEM_DefaultAlloc(size, 1); ++ void* p = FXMEM_DefaultAlloc(size); + memmove(p, Org, size); + return p; } diff --git a/third_party/lcms/src/cmserr.c b/third_party/lcms/src/cmserr.c index 3c3848b2a2..69b0550a41 100644 --- a/third_party/lcms/src/cmserr.c +++ b/third_party/lcms/src/cmserr.c @@ -75,13 +75,13 @@ cmsBool _cmsRegisterMemHandlerPlugin(cmsContext ContextID, cmsPluginBase* Plugi // Generic allocate void* CMSEXPORT _cmsMalloc(cmsContext ContextID, cmsUInt32Number size) { - return FXMEM_DefaultAlloc(size, 1); + return FXMEM_DefaultAlloc(size); } // Generic allocate & zero void* CMSEXPORT _cmsMallocZero(cmsContext ContextID, cmsUInt32Number size) { - void* p = FXMEM_DefaultAlloc(size, 1); + void* p = FXMEM_DefaultAlloc(size); if (p) memset(p, 0, size); return p; } @@ -99,19 +99,19 @@ void* CMSEXPORT _cmsCalloc(cmsContext ContextID, cmsUInt32Number num, cmsUInt32N // Generic reallocate void* CMSEXPORT _cmsRealloc(cmsContext ContextID, void* Ptr, cmsUInt32Number size) { - return FXMEM_DefaultRealloc(Ptr, size, 1); + return FXMEM_DefaultRealloc(Ptr, size); } // Generic free memory void CMSEXPORT _cmsFree(cmsContext ContextID, void* Ptr) { - if (Ptr != NULL) FXMEM_DefaultFree(Ptr, 0); + if (Ptr != NULL) FXMEM_DefaultFree(Ptr); } // Generic block duplication void* CMSEXPORT _cmsDupMem(cmsContext ContextID, const void* Org, cmsUInt32Number size) { - void* p = FXMEM_DefaultAlloc(size, 1); + void* p = FXMEM_DefaultAlloc(size); memmove(p, Org, size); return p; } diff --git a/third_party/libpng16/0000-build-config.patch b/third_party/libpng16/0000-build-config.patch index 5c30866405..325b58fe02 100644 --- a/third_party/libpng16/0000-build-config.patch +++ b/third_party/libpng16/0000-build-config.patch @@ -5,8 +5,8 @@ diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c #include "pngpriv.h" -+void* FXMEM_DefaultAlloc(int byte_size, int); -+void FXMEM_DefaultFree(void* pointer, int); ++void* FXMEM_DefaultAlloc(size_t byte_size); ++void FXMEM_DefaultFree(void* pointer); + #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) /* Free a png_struct */ @@ -16,7 +16,7 @@ diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c else #endif - return malloc((size_t)size); /* checked for truncation above */ -+ return FXMEM_DefaultAlloc((int)size, 0); ++ return FXMEM_DefaultAlloc(size); } else @@ -25,7 +25,7 @@ diff a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c #endif /* USER_MEM */ - free(ptr); -+ FXMEM_DefaultFree(ptr, 0); ++ FXMEM_DefaultFree(ptr); } #ifdef PNG_USER_MEM_SUPPORTED diff --git a/third_party/libpng16/pngmem.c b/third_party/libpng16/pngmem.c index b5507134fb..cf815a6f88 100644 --- a/third_party/libpng16/pngmem.c +++ b/third_party/libpng16/pngmem.c @@ -19,8 +19,8 @@ #include "pngpriv.h" -void* FXMEM_DefaultAlloc(int byte_size, int); -void FXMEM_DefaultFree(void* pointer, int); +void* FXMEM_DefaultAlloc(size_t byte_size); +void FXMEM_DefaultFree(void* pointer); #if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) /* Free a png_struct */ @@ -95,7 +95,7 @@ png_malloc_base,(png_const_structrp png_ptr, png_alloc_size_t size), else #endif - return FXMEM_DefaultAlloc((int)size, 0); + return FXMEM_DefaultAlloc(size); } else @@ -252,7 +252,7 @@ png_free_default,(png_const_structrp png_ptr, png_voidp ptr),PNG_DEPRECATED) return; #endif /* USER_MEM */ - FXMEM_DefaultFree(ptr, 0); + FXMEM_DefaultFree(ptr); } #ifdef PNG_USER_MEM_SUPPORTED |