Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Unified Diff: fpdfsdk/include/fpdfview.h

Issue 862163002: Use signed long for FPDF_GetNamedDest buffer length. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: fix comments Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/include/fpdfview.h
diff --git a/fpdfsdk/include/fpdfview.h b/fpdfsdk/include/fpdfview.h
index e36d54e0a258983a6fcd5b2940e73c800ffb758e..f9df4083a8bcfbf0b839528178274e8f7c2a3afe 100644
--- a/fpdfsdk/include/fpdfview.h
+++ b/fpdfsdk/include/fpdfview.h
@@ -623,19 +623,19 @@ DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_
// Function: FPDF_GetNamedDest
// Get the specified named destinations of the PDF document by index.
// Parameters:
-// document - Handle to a document
-// index - The index of named destination.
-// buffer - The buffer to obtain destination name, used as wchar_t*.
-// buflen - The length of the buffer in byte.
+// document - Handle to a document
+// index - The index of named destination.
+// buffer - The buffer to obtain destination name, used as wchar_t*.
+// buflen [in/out] - Size of the buffer in bytes on input, length of the result in bytes on output or -1 if the buffer is too small.
// Return value:
-// The destination handle of a named destination, NULL when retrieving the length.
+// The destination handle of a named destination, or NULL if no named destination corresponding to |index|.
// Comments:
// Call this function twice to get the name of the named destination:
// 1) First time pass in |buffer| as NULL and get buflen.
// 2) Second time pass in allocated |buffer| and buflen to retrieve |buffer|, which should be used as wchar_t*.
-// If buflen is not sufficiently large, it will be returned as -1.
+// If buflen is not sufficiently large, it will be set to -1 upon return.
//
-DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, unsigned long& buflen);
+DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDest(FPDF_DOCUMENT document, int index, void* buffer, long& buflen);
#ifdef __cplusplus
« no previous file with comments | « no previous file | fpdfsdk/src/fpdfview.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698