Make DOH Char macro more robust
For example, `Char(foo)[0]` now works to get the first character of DOH String `foo`. Previously this gave a confusing error because it expanded to `(char *) Data(foo)[0]` and the `[0]` binds more tightly than the `(char *)`.
This commit is contained in:
parent
94ad89284d
commit
4c7febfb80
1 changed files with 1 additions and 1 deletions
|
|
@ -364,7 +364,7 @@ extern void DohMemoryDebug(void);
|
|||
#define Push(s,x) DohInsertitem(s,DOH_BEGIN,x)
|
||||
#define Len DohLen
|
||||
#define Data DohData
|
||||
#define Char (char *) Data
|
||||
#define Char(X) ((char *) Data(X))
|
||||
#define Cmp DohCmp
|
||||
#define Equal DohEqual
|
||||
#define Setline DohSetline
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue