Make length parameter in FPDFAttachment_SetFile() non-const.
This makes the API more consistent with other APIs. The const keyword
does not add much value to pass-by-value parameters.
Change-Id: I8c1967d39675eb246d4ffd8b075254ddef75149a
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/70470
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_attachment.cpp b/fpdfsdk/fpdf_attachment.cpp
index b3324e6..da5e6e3 100644
--- a/fpdfsdk/fpdf_attachment.cpp
+++ b/fpdfsdk/fpdf_attachment.cpp
@@ -201,7 +201,7 @@
FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
FPDF_DOCUMENT document,
const void* contents,
- const unsigned long len) {
+ unsigned long len) {
CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment);
CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document);
if (!pFile || !pFile->IsDictionary() || !pDoc || len > INT_MAX)
diff --git a/public/fpdf_attachment.h b/public/fpdf_attachment.h
index 791a90b..afd4eb0 100644
--- a/public/fpdf_attachment.h
+++ b/public/fpdf_attachment.h
@@ -146,7 +146,7 @@
FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment,
FPDF_DOCUMENT document,
const void* contents,
- const unsigned long len);
+ unsigned long len);
// Experimental API.
// Get the file data of |attachment|. |buffer| is only modified if |buflen| is