summaryrefslogtreecommitdiff
path: root/poppler/Error.cc
diff options
context:
space:
mode:
authorKrzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>2007-09-24 01:03:09 -0700
committerKrzysztof Kowalczyk <kkowalczyk@tlapx60ubu.(none)>2007-09-24 01:03:09 -0700
commited01b3965c57ce2a4eabf9c46b5319ea627d3324 (patch)
tree8a90f55592218bada6a8ccad04a1e41d6a54b9be /poppler/Error.cc
parent71fb15f8bd131a13d8cf0f394fe601cfbb6e1772 (diff)
Match declaration of setErrorFunction with its definition.
Also enable this code for Windows, since CDECL was what was throwing msvc off.
Diffstat (limited to 'poppler/Error.cc')
-rw-r--r--poppler/Error.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/poppler/Error.cc b/poppler/Error.cc
index fe1413b3..80e45aa6 100644
--- a/poppler/Error.cc
+++ b/poppler/Error.cc
@@ -18,7 +18,7 @@
#include "GlobalParams.h"
#include "Error.h"
-static void CDECL defaultErrorFunction(int pos, char *msg, va_list args)
+static void defaultErrorFunction(int pos, char *msg, va_list args)
{
if (pos >= 0) {
fprintf(stderr, "Error (%d): ", pos);
@@ -30,14 +30,12 @@ static void CDECL defaultErrorFunction(int pos, char *msg, va_list args)
fflush(stderr);
}
-#ifndef _MSC_VER
-static void CDECL (*errorFunction)(int , char *, va_list args) = defaultErrorFunction;
+static void (*errorFunction)(int, char *, va_list args) = defaultErrorFunction;
-void setErrorFunction(void CDECL (* f)(int , char *, va_list args))
+void setErrorFunction(void (* f)(int, char *, va_list args))
{
errorFunction = f;
}
-#endif
void CDECL error(int pos, char *msg, ...) {
va_list args;
@@ -46,11 +44,7 @@ void CDECL error(int pos, char *msg, ...) {
return;
}
va_start(args, msg);
-#ifdef _MSC_VER
- defaultErrorFunction(pos, msg, args);
-#else
(*errorFunction)(pos, msg, args);
-#endif
va_end(args);
}