Patch for the HTArray_firstObject() macro

The HTArray_firstObject() macro is defined such that if you don't
use a variable named exactly "data" as the second parameter, you get
a syntax error (because of the reference to the "data" name in the
structure).

I suggest changing the variable in the define from "data" to "dp".
Here's a patch for the HTArray.html file:

--- HTArray.html	Wed May 13 19:10:14 1998
+++ HTArray.html.new	Thu Mar  2 15:43:41 2000
@@ -82,10 +82,10 @@
 Fast macros to traverse a macro ending in a NULL element.
 
 <PRE>
-#define HTArray_firstObject(me, data) \
-	((me) &amp;&amp; ((data)=(me)-&gt;data) ? *(data)++ : NULL)
-#define HTArray_nextObject(me, data) \
-	((me) &amp;&amp; (data) ? *(data)++ : NULL)
+#define HTArray_firstObject(me, dp) \
+	((me) &amp;&amp; ((dp)=(me)-&gt;data) ? *(dp)++ : NULL)
+#define HTArray_nextObject(me, dp) \
+	((me) &amp;&amp; (dp) ? *(dp)++ : NULL)
 </PRE>
 
 <H2>Sort an Array</H2>

..wayne..

Received on Thursday, 2 March 2000 18:44:34 UTC