]> granicus.if.org Git - libexpat/commitdiff
Added type cast necessary for compiling as C++ file (at least under VC++).
authorKarl Waclawek <kwaclaw@users.sourceforge.net>
Tue, 10 Aug 2004 18:06:29 +0000 (18:06 +0000)
committerKarl Waclawek <kwaclaw@users.sourceforge.net>
Tue, 10 Aug 2004 18:06:29 +0000 (18:06 +0000)
expat/examples/elements.c

index 78d7d9334072ceb618602c3ea7c4e59b940ee828..52f47adf46dbe49aee705ec7d3e5d6e5246375d2 100644 (file)
@@ -11,7 +11,7 @@ static void XMLCALL
 startElement(void *userData, const char *name, const char **atts)
 {
   int i;
-  int *depthPtr = userData;
+  int *depthPtr = (int *)userData;
   for (i = 0; i < *depthPtr; i++)
     putchar('\t');
   puts(name);
@@ -21,7 +21,7 @@ startElement(void *userData, const char *name, const char **atts)
 static void XMLCALL
 endElement(void *userData, const char *name)
 {
-  int *depthPtr = userData;
+  int *depthPtr = (int *)userData;
   *depthPtr -= 1;
 }