summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdfview.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-12 16:17:04 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-12 16:17:04 -0700
commitb2aa54381811383d4a86fbe7b194907c33e8dcc1 (patch)
treec6e7003e8c63a060345147a2243d114d19fa54d7 /fpdfsdk/src/fpdfview.cpp
parente6bd866c5c64950a8b2836e7254e1f44b2fe0925 (diff)
downloadpdfium-b2aa54381811383d4a86fbe7b194907c33e8dcc1.tar.xz
Make (and verify) public/ files compile under C.
This involves adding some missing extern "C" { } declarations, using FPDF_ types instead of C++ types, and converting pass by reference arguments into pointers. Test this using fpdfview_embedertest for simplicity. BUG=pdfium:158 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1130843003
Diffstat (limited to 'fpdfsdk/src/fpdfview.cpp')
-rw-r--r--fpdfsdk/src/fpdfview.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index d977996232..637ac96abc 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -825,10 +825,10 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_
return name_tree.LookupNamedDest(pDoc, name);
}
-DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long& buflen)
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long* buflen)
{
if (!buffer)
- buflen = 0;
+ *buflen = 0;
if (!document || index < 0) return NULL;
CPDF_Document* pDoc = (CPDF_Document*)document;
@@ -865,12 +865,12 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index,
CFX_ByteString utf16Name = wsName.UTF16LE_Encode();
unsigned int len = utf16Name.GetLength();
if (!buffer) {
- buflen = len;
- } else if (buflen >= len) {
+ *buflen = len;
+ } else if (*buflen >= len) {
memcpy(buffer, utf16Name.c_str(), len);
- buflen = len;
+ *buflen = len;
} else {
- buflen = -1;
+ *buflen = -1;
}
return (FPDF_DEST)pDestObj;
}