diff options
author | Jane Liu <janeliulwq@google.com> | 2017-07-25 14:44:11 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-07-26 17:32:10 +0000 |
commit | 605fb604ae9c868f840523db6a65d5088fbec07c (patch) | |
tree | ebcfb5fa8c9682d95bd9291d3cd6493fd5722edc /fpdfsdk | |
parent | 1e6ec62e18b7d03d0bae98422e9c7db9364b149b (diff) | |
download | pdfium-605fb604ae9c868f840523db6a65d5088fbec07c.tar.xz |
Added missing STDCALLchromium/3168
This CL adds the missing STDCALLs in attachment APIs.
Bug=pdfium:818
Change-Id: Ifaa9cf84d4036cd6444167f8efd16dad81224afc
Reviewed-on: https://pdfium-review.googlesource.com/8930
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/fpdfattachment.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fpdfsdk/fpdfattachment.cpp b/fpdfsdk/fpdfattachment.cpp index 724664b05d..78fccf4d60 100644 --- a/fpdfsdk/fpdfattachment.cpp +++ b/fpdfsdk/fpdfattachment.cpp @@ -4,6 +4,9 @@ #include "public/fpdf_attachment.h" +#include <memory> +#include <utility> + #include "core/fdrm/crypto/fx_crypt.h" #include "core/fpdfapi/page/cpdf_streamparser.h" #include "core/fpdfapi/parser/cpdf_array.h" @@ -51,8 +54,8 @@ DLLEXPORT int STDCALL FPDFDoc_GetAttachmentCount(FPDF_DOCUMENT document) { return CPDF_NameTree(pDoc, "EmbeddedFiles").GetCount(); } -DLLEXPORT FPDF_ATTACHMENT FPDFDoc_AddAttachment(FPDF_DOCUMENT document, - FPDF_WIDESTRING name) { +DLLEXPORT FPDF_ATTACHMENT STDCALL FPDFDoc_AddAttachment(FPDF_DOCUMENT document, + FPDF_WIDESTRING name) { CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); CFX_WideString wsName = CFX_WideString::FromUTF16LE(name, CFX_WideString::WStringLength(name)); @@ -198,10 +201,10 @@ FPDFAttachment_GetStringValue(FPDF_ATTACHMENT attachment, return Utf16EncodeMaybeCopyAndReturnLength(value, buffer, buflen); } -DLLEXPORT FPDF_BOOL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment, - FPDF_DOCUMENT document, - const void* contents, - const unsigned long len) { +DLLEXPORT FPDF_BOOL STDCALL FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment, + FPDF_DOCUMENT document, + const void* contents, + const unsigned long len) { CPDF_Object* pFile = CPDFObjectFromFPDFAttachment(attachment); CPDF_Document* pDoc = CPDFDocumentFromFPDFDocument(document); if (!pFile || !pFile->IsDictionary() || !pDoc || len > INT_MAX) |