Closed
Bug 681188
Opened 13 years ago
Closed 13 years ago
Switch from PRBool to bool (in comm-central)
Categories
(Thunderbird :: General, defect)
Thunderbird
General
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 10.0
People
(Reporter: mwu, Assigned: mwu)
References
Details
Attachments
(5 files, 4 obsolete files)
If m-c switches to bool from PRBool, comm-central needs to switch at the same time to avoid massive burning.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #557273 -
Flags: review?(mbanner)
Assignee | ||
Comment 2•13 years ago
|
||
This is a simplified version of the commands I used to convert mozilla-central.
The actual patch is a bit less than 2mb.
Attachment #557275 -
Flags: review?(mbanner)
Assignee | ||
Comment 3•13 years ago
|
||
These appear to be the only two things necessary so far. It builds suite successfully on Linux.
Assignee | ||
Comment 4•13 years ago
|
||
Also, the commands in #2 end up touching ldap, which appears to be its own thing. Not sure what special things are necessary to get things landed over there.
Comment 5•13 years ago
|
||
For ldap c-sdk we need to file a bug in Directory / LDAP C SDK, and attach a patch or script there and get richm to review.
Once we've done that I can get it landed and into the tree.
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #5)
> For ldap c-sdk we need to file a bug in Directory / LDAP C SDK, and attach a
> patch or script there and get richm to review.
>
> Once we've done that I can get it landed and into the tree.
So, as it turns out, I only touched stuff in ldap/xpcom, which is in comm-central after all. This should make things easier.
Comment 7•13 years ago
|
||
Comment on attachment 557275 [details]
2. Commands to generate a patch that s/PRBool/bool/, v3
Somehow I can't get this to work. Various lines are missing a '\' on the end, and the mac version of sed doesn't like -i -e, you have to do:
sed -i '' -e ....
which I believe is right.
However, even with fixing that lot up, sed doesn't actually seem to do anything, and although the files get touched, there is nothing in the resultant diff.
Attachment #557275 -
Flags: review?(mbanner) → review-
Comment 8•13 years ago
|
||
Comment on attachment 557273 [details] [diff] [review]
1. Convert C++ code in IDLs to bool
- PRBool isExternalAttachment; // Flag for determining if the attachment is external
+ bool isExternalAttachment; // Flag for determining if the attachment is external
Will we not also need to bump the uuid for these interfaces when the change happens, so that binary extensions have something to detect against?
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #8)
> Comment on attachment 557273 [details] [diff] [review]
> 1. Convert C++ code in IDLs to bool
>
> - PRBool isExternalAttachment; // Flag for determining if the attachment
> is external
> + bool isExternalAttachment; // Flag for determining if the attachment
> is external
>
> Will we not also need to bump the uuid for these interfaces when the change
> happens, so that binary extensions have something to detect against?
Binary extensions must be recompiled for every release now AFAIK.
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Mark Banner (:standard8) from comment #7)
> Comment on attachment 557275 [details]
> 2. Commands to generate a patch that s/PRBool/bool/, v3
>
> Somehow I can't get this to work. Various lines are missing a '\' on the
> end, and the mac version of sed doesn't like -i -e, you have to do:
>
> sed -i '' -e ....
>
> which I believe is right.
>
> However, even with fixing that lot up, sed doesn't actually seem to do
> anything, and although the files get touched, there is nothing in the
> resultant diff.
Opps. I forgot to insert a few \ while formatting this to look pretty.
But this does work when run on a GNU system userspace and there isn't much need to port it to other unix systems. I'll attach a fixed version and a patch generated from the commands.
Assignee | ||
Comment 11•13 years ago
|
||
Attachment #558510 -
Flags: review?(mbanner)
Assignee | ||
Updated•13 years ago
|
Attachment #557275 -
Attachment is obsolete: true
Assignee | ||
Comment 12•13 years ago
|
||
Assignee | ||
Comment 13•13 years ago
|
||
Hm apparently there are a number of cases where PR_FALSE/TRUE is specified twice on a line, so the PR_TRUE/PR_FALSE sed should be run twice to cover that case.
For example:
-+ bool isJunk = PR_FALSE, isNotJunk = false;
++ bool isJunk = false, isNotJunk = false;
Assignee | ||
Comment 14•13 years ago
|
||
Assignee | ||
Updated•13 years ago
|
Attachment #560634 -
Attachment description: Sed script to do s/PRBool/bool/ → Sed script to do s/PRBool/bool/ for OSX
Assignee | ||
Comment 15•13 years ago
|
||
This version is easier to use but requires the sed script I just attached.
Attachment #558510 -
Attachment is obsolete: true
Attachment #558510 -
Flags: review?(mbanner)
Attachment #560636 -
Flags: review?(mbanner)
Assignee | ||
Comment 16•13 years ago
|
||
Assignee | ||
Comment 17•13 years ago
|
||
Forgot to add a g at the end.
Attachment #560637 -
Attachment is obsolete: true
Assignee | ||
Comment 18•13 years ago
|
||
Attachment #560634 -
Attachment is obsolete: true
Assignee | ||
Updated•13 years ago
|
Attachment #560638 -
Attachment description: Sed script to do s/PRBool/bool/ for Windows/OSX, v2 → Sed script to do s/PRBool/bool/ for Windows/Linux, v2
Updated•13 years ago
|
Attachment #557273 -
Flags: review?(mbanner) → review+
Comment 19•13 years ago
|
||
Comment on attachment 560636 [details]
2. Script to do s/PRBool/bool/, v5
This looks good. I've not been able to test all of it, but the results seem sane.
Thanks for doing these patches/scripts.
Attachment #560636 -
Flags: review?(mbanner) → review+
Assignee | ||
Comment 20•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•13 years ago
|
Target Milestone: --- → Thunderbird 10.0
You need to log in
before you can comment on or make changes to this bug.
Description
•