4 years ago
Depends on: 956806
Might be best (smallest) to just generate a single string with all the names in it, and generate a separate table of offsets into that string.
Created attachment 8373361 [details] [diff] [review] reduce relocations required by NamesOfInterfacesWithProtos Hooray for string tables. This compiles fine with GCC, but I think at one point GCC used to complain about \0 in string constants. May have to take a different tack if B2G builds complain, or if other compilers are pedantic as well.
Attachment #8373361 - Flags: review?(bzbarsky)
Comment on attachment 8373361 [details] [diff] [review] reduce relocations required by NamesOfInterfacesWithProtos >+ return "extern const char *%s(unsigned int aIndex);\n\n" % self.accessorName I'd prefer we drop the trailing \n here and have the caller insert them as needed. That lets the caller control its own spacing. Yes, we're not very consistent about that sort of thing right now. :( Simply making the CGList in the caller use "\n\n" instead of "\n" as the list separator might be good here. >+ return """ >+const char *%s(unsigned int aIndex) Please drop the leading newline here? r=me
Attachment #8373361 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.