d54a7c99ec18bbdc6103a24f2e2123346eb793b9 tdreszer Mon Apr 18 14:18:33 2011 -0700 Fixed an inefficient macro from long ago. Jim caought this in code review diff --git src/inc/dystring.h src/inc/dystring.h index 00b8529..c4d4c26 100644 --- src/inc/dystring.h +++ src/inc/dystring.h @@ -70,27 +70,27 @@ struct dyString * dyStringSub(char *orig, char *in, char *out); /* Make up a duplicate of orig with all occurences of in substituted * with out. */ void dyStringBumpBufSize(struct dyString *ds, int size); /* Force dyString buffer to be at least given size. */ char *dyStringCannibalize(struct dyString **pDy); /* Kill dyString, but return the string it is wrapping * (formerly dy->string). This should be free'd at your * convenience. */ #define dyStringContents(ds) (ds)->string /* return raw string. */ -#define dyStringLen(ds) strlen((ds)->string) +#define dyStringLen(ds) ds->stringSize /* return raw string length. */ void dyStringResize(struct dyString *ds, int newSize); /* resize a string, if the string expands, blanks are appended */ void dyStringQuoteString(struct dyString *dy, char quotChar, char *text); /* Append quotChar-quoted text (with any internal occurrences of quotChar * \-escaped) onto end of dy. */ #endif /* DYSTRING_H */