chiark / gitweb /
Allow things to be looked up by just their caller-supplied hashes. This
[mLib] / dstr.h
diff --git a/dstr.h b/dstr.h
index 938378a0e747d1927825535adadb084af6679483..13e7d4dbeaaaf2d3a40d2527c17c0e1db6bcb4ee 100644 (file)
--- a/dstr.h
+++ b/dstr.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
- * $Id: dstr.h,v 1.6 1999/05/21 08:38:14 mdw Exp $
+ * $Id: dstr.h,v 1.7 1999/05/21 22:12:12 mdw Exp $
  *
  * Handle dynamically growing strings
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------*
  *
  * $Log: dstr.h,v $
+ * Revision 1.7  1999/05/21 22:12:12  mdw
+ * Fix the bugs in the new macros.  (Whoops.)
+ *
  * Revision 1.6  1999/05/21 08:38:14  mdw
  * Add some more macros, particularly for creation and destruction.
  *
@@ -82,7 +85,7 @@ typedef struct dstr {
   size_t len;                          /* Length of the string */
 } dstr;
 
-#define DSTR_INIT = { 0, 0, 0 };       /* How to initialize one */
+#define DSTR_INIT { 0, 0, 0 }          /* How to initialize one */
 
 /*----- Functions provided ------------------------------------------------*/
 
@@ -130,7 +133,7 @@ extern void dstr_destroy(dstr */*d*/);
 
 extern void dstr_reset(dstr */*d*/);
 
-#define DRESET(d) do (d)->len = 0; while (0)
+#define DRESET(d) ((d)->len = 0)
 
 /* --- @dstr_ensure@ --- *
  *