It is not possible to compile time concatenate defined string if you want them in a wide flavour. jag, found something out in bug 89742: > I remember someone stating that NS_LITERAL_STRING(FOO) works because the > preprocessor needs to resolve |FOO| before handing it to NS_L (see the #define > for NS_LITERAL_STRING in nsLiteralString.h), so we could do something similar > for NS_L (#define NS_L(s) NS_L_IMPL(s), #define NS_L_IMPL L##s). > Could you quickly test that by adding this define to nsBookmarksService.cpp: > #define NS_LL(s) NS_L(s) > and then using NS_MULTILINE_LITERAL_STRING(NS_LL(NC_BOOKMARKSROOT) > NS_LL("#$")) ... and it worked (compiled)
Summary: Allow wide concatenation of defined string constants → Allow wide concatenation of defined string constants
Target Milestone: --- → mozilla0.9.7
Does this really work? And if so, why? And if you know why, shouldn't the comments explain it? :-) If it does work, and you explain it in the comments, I have no problem with this. After appropriate additional comments, sr=scc.
Created attachment 59053 [details] [diff] [review] Better comment
Attachment #52724 - Attachment is obsolete: true
Comment on attachment 59053 [details] [diff] [review] Better comment r=dbaron
Attachment #59053 - Flags: review+
Checked in, marking fixed.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.