Re: Switching nsnull to nullptr

2012-08-14 Thread Aryeh Gregor
nsnull has now been completely removed, and will no longer work: https://hg.mozilla.org/mozilla-central/rev/fb2d41f41c15 Everyone needs to use nullptr exclusively from now on. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mo

Re: Switching nsnull to nullptr

2012-08-09 Thread Ehsan Akhgari
On 12-08-08 9:16 PM, Nicholas Nethercote wrote: On Mon, Jul 30, 2012 at 4:14 AM, Aryeh Gregor wrote: When are we doing PRUint32? ;-) I'll see if I can't tackle that after I'm done with nsnull and nsresult. Great! I think the change to using stdint types in SpiderMonkey was a wonderful ste

Re: Switching nsnull to nullptr

2012-08-08 Thread Nicholas Nethercote
On Mon, Jul 30, 2012 at 4:14 AM, Aryeh Gregor wrote: >> >> When are we doing PRUint32? ;-) > > I'll see if I can't tackle that after I'm done with nsnull and nsresult. Great! I think the change to using stdint types in SpiderMonkey was a wonderful step forward. It was also amusing to see how ma

Re: Switching nsnull to nullptr

2012-08-07 Thread Aryeh Gregor
On Sun, Jul 29, 2012 at 1:19 AM, Jonas Sicking wrote: > By the way, I want to say thanks for doing this!! I definitely believe that > things like this is both helping with making our code more approachable, and > generally come with other benefits too. Such as the type safety in this > case. > > W

Re: Switching nsnull to nullptr

2012-08-02 Thread Scott Johnson
On 07/28/2012 05:19 PM, thus spoke Jonas Sicking: > When are we doing PRUint32? ;-) +1! ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform

Re: Switching nsnull to nullptr

2012-07-30 Thread Ehsan Akhgari
On 12-07-30 10:23 AM, Aryeh Gregor wrote: On Wednesday, July 25, 2012 12:45:52 PM UTC+3, Aryeh Gregor wrote: The C++11 standard defines a new dedicated null-pointer symbol, "nullptr". It provides better type-safety than existing null-pointer definitions, because it doesn't allow implicit conve

Re: Switching nsnull to nullptr

2012-07-30 Thread Aryeh Gregor
On Wednesday, July 25, 2012 12:45:52 PM UTC+3, Aryeh Gregor wrote: > The C++11 standard defines a new dedicated null-pointer symbol, "nullptr". > It provides better type-safety than existing null-pointer definitions, > because it doesn't allow implicit conversion to numeric types. In >

Re: Switching nsnull to nullptr

2012-07-28 Thread Jonas Sicking
On Jul 25, 2012 2:50 AM, "Aryeh Gregor" wrote: > > The C++11 standard defines a new dedicated null-pointer symbol, "nullptr". It provides better type-safety than existing null-pointer definitions, because it doesn't allow implicit conversion to numeric types. In

Re: Switching nsnull to nullptr

2012-07-26 Thread L. David Baron
On Thursday 2012-07-26 00:55 -0700, Aryeh Gregor wrote: > I guess we could define it to be NULL instead of 0L/0LL, but surely there was > some reason we didn't do that for nsnull to begin with? There are some header files in various libraries or OSes that define NULL for C++ as ((void*)0) rather

Re: Switching nsnull to nullptr

2012-07-26 Thread Dave Mandelin
On Thursday, July 26, 2012 12:55:15 AM UTC-7, Aryeh Gregor wrote: > On Wednesday, July 25, 2012 8:45:22 PM UTC+3, Dave Mandelin wrote: > > SpiderMonkey officially has a C++ API now, so nullptr should be OK. > There is at least one wrinkle, which is that we need to support jsd for a > while yet, w

Re: Switching nsnull to nullptr

2012-07-26 Thread Aryeh Gregor
On Wednesday, July 25, 2012 8:45:22 PM UTC+3, Dave Mandelin wrote: > SpiderMonkey officially has a C++ API now, so nullptr should be OK. There is > at least one wrinkle, which is that we need to support jsd for a while yet, > which is C. There are a few |NULL|s in jsapi.h that look like they are

Re: Switching nsnull to nullptr

2012-07-25 Thread Dave Mandelin
On Wednesday, July 25, 2012 2:19:43 PM UTC-7, Ehsan Akhgari wrote: > On 12-07-25 1:45 PM, Dave Mandelin wrote: > > On Wednesday, July 25, 2012 7:45:43 AM UTC-7, Bobby Holley wrote: > >> On Wed, Jul 25, 2012 at 4:21 PM, Aryeh Gregor wrote: > >> > >> > On Wednesday, July 25, 2012 3:04:31 PM UTC+3,

Re: Switching nsnull to nullptr

2012-07-25 Thread Ehsan Akhgari
On 12-07-25 1:02 PM, Chris Peterson wrote: gcc did not add nullptr until gcc 4.6. For gcc <= 4.5 (like Android's gcc 4.4), we should consider using gcc's magic __null: #define nullptr __null Also, gcc 4.7 added a new -Wzero-as-null-pointer-constant warning to flag uses of literal 0 as a poin

Re: Switching nsnull to nullptr

2012-07-25 Thread Ehsan Akhgari
On 12-07-25 1:45 PM, Dave Mandelin wrote: On Wednesday, July 25, 2012 7:45:43 AM UTC-7, Bobby Holley wrote: On Wed, Jul 25, 2012 at 4:21 PM, Aryeh Gregor wrote: > On Wednesday, July 25, 2012 3:04:31 PM UTC+3, Justin Lebar wrote: > > > The next step is to s/nsnull/nullptr/ in the codebase, an

Re: Switching nsnull to nullptr

2012-07-25 Thread Dave Mandelin
On Wednesday, July 25, 2012 7:45:43 AM UTC-7, Bobby Holley wrote: > On Wed, Jul 25, 2012 at 4:21 PM, Aryeh Gregor wrote: > > > On Wednesday, July 25, 2012 3:04:31 PM UTC+3, Justin Lebar wrote: > > > > The next step is to s/nsnull/nullptr/ in the codebase, and > get rid > > of nsnull. > > > > >

Re: Switching nsnull to nullptr

2012-07-25 Thread Chris Peterson
gcc did not add nullptr until gcc 4.6. For gcc <= 4.5 (like Android's gcc 4.4), we should consider using gcc's magic __null: #define nullptr __null Also, gcc 4.7 added a new -Wzero-as-null-pointer-constant warning to flag uses of literal 0 as a pointer (in C++ code). We could enable this wa

Re: Switching nsnull to nullptr

2012-07-25 Thread Bobby Holley
On Wed, Jul 25, 2012 at 4:21 PM, Aryeh Gregor wrote: > On Wednesday, July 25, 2012 3:04:31 PM UTC+3, Justin Lebar wrote: > > > The next step is to s/nsnull/nullptr/ in the codebase, and get rid > of nsnull. > > > > Forgive my ignorance, but how does this affect NULL? Would that be > > deprecated

Re: Switching nsnull to nullptr

2012-07-25 Thread Aryeh Gregor
On Wednesday, July 25, 2012 3:04:31 PM UTC+3, Justin Lebar wrote: > > The next step is to s/nsnull/nullptr/ in the codebase, and get rid of > nsnull. > > Forgive my ignorance, but how does this affect NULL? Would that be > deprecated in favor of nullptr as well? Should we use nsnull instead > o

Re: Switching nsnull to nullptr

2012-07-25 Thread Justin Lebar
> The next step is to s/nsnull/nullptr/ in the codebase, and get rid of nsnull. Forgive my ignorance, but how does this affect NULL? Would that be deprecated in favor of nullptr as well? Should we use nsnull instead of NULL in new code, in anticipation of the nsnull --> nullptr switch? -Justin