Ehsan Akhgari
|
085494b95d
|
Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:
# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.cc" \
-o -iname "*.mm" \) | \
xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}
convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
modules/libmar/src/mar_private.h \
modules/libmar/src/mar.h
# assert_replacer.py
#!/usr/bin/python
import sys
import re
pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")
def replaceInPlace(fname):
print fname
f = open(fname, "rw+")
lines = f.readlines()
for i in range(0, len(lines)):
while True:
index = re.search(pattern, lines[i])
if index != None:
index = index.start()
lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
for j in range(i + 1, len(lines)):
if lines[j].find(" ", index) == index:
lines[j] = lines[j][0:index] + lines[j][index+4:]
else:
break
else:
break
f.seek(0, 0)
f.truncate()
f.write("".join(lines))
f.close()
argc = len(sys.argv)
for i in range(1, argc):
replaceInPlace(sys.argv[i])
--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
|
2013-07-18 13:59:53 -04:00 |
|
Magnus Melin
|
c14a8eb65c
|
Bug 804664 - remove typedef nsAutoCString nsCAutoString. r=benjamin
|
2012-10-23 20:53:15 +03:00 |
|
Isaac Aggrey
|
0cc4b12d36
|
Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan
|
2012-09-28 01:57:33 -05:00 |
|
Steve Workman
|
f9692d1c9a
|
Bug 790807: Add 64 bit nsAString::ToInteger; r=bsmedberg
|
2012-09-17 21:10:50 -04:00 |
|
Randell Jesup
|
4d2ab05d09
|
Bug 773151: provide back-compatibility for external API code using nsCAutoString CLOSED TREE r=bsmedberg
|
2012-07-14 00:01:09 -04:00 |
|
Randell Jesup
|
29ac5c0b8c
|
Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg
|
2012-09-01 22:35:17 -04:00 |
|
Ehsan Akhgari
|
8c296bbcd4
|
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script. Here's the source of the script for
future reference:
function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
! -wholename "*security/nss*" \
! -wholename "*/.hg*" \
! -wholename "obj-ff-dbg*" \
! -name nsXPCOMCID.h \
! -name prtypes.h \
-type f \
\( -iname "*.cpp" \
-o -iname "*.h" \
-o -iname "*.c" \
-o -iname "*.cc" \
-o -iname "*.idl" \
-o -iname "*.ipdl" \
-o -iname "*.ipdlh" \
-o -iname "*.mm" \) | \
xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}
convert PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
|
2012-08-22 11:56:38 -04:00 |
|
Aryeh Gregor
|
57c0ad57fb
|
Bug 777292 part 2 - Change all nsnull to nullptr
|
2012-07-30 17:20:58 +03:00 |
|
Gervase Markham
|
87620f5676
|
Bug 716478 - update licence to MPL 2.
|
2012-05-21 12:12:37 +01:00 |
|
Mark Capella
|
4666038a24
|
Bug 712936 - Convert users of PR_STATIC_ASSERT to MOZ_STATIC_ASSERT. r=jwalden
|
2012-04-02 17:21:24 -07:00 |
|
Mike Hommey
|
a062e24d2d
|
Bug 716544 - Fix comparison between signed and unsigned integer expressions in nsStringAPI.h. r=dbaron
|
2012-03-13 09:47:02 +01:00 |
|
Mike Hommey
|
c17402ac1f
|
Backout changesets 923a278f7ad5, 8f0164c90145, f5171db26f48, 7b590e1e392c and bd9a2f904e1f (bug 716544) because of Linux red
|
2012-03-13 10:29:26 +01:00 |
|
Mike Hommey
|
f23ba363ff
|
Bug 716544 - Fix comparison between signed and unsigned integer expressions in nsStringAPI.h. r=dbaron
|
2012-03-13 09:47:02 +01:00 |
|
Makoto Kato
|
8a1baaa906
|
Bug 717526 - fix warning of nsStringAPI.h on Win64. r=dbaron
|
2012-01-25 15:43:27 +09:00 |
|
Jeff Walden
|
5d0d2b2e73
|
Bug 711647 - Add MOZ_DELETE to a bunch of deliberately-not-implemented methods across the tree. r=dbaron
--HG--
extra : rebase_source : 507006c0f099da6851b585d2062267d285978ad7
|
2011-12-16 14:42:07 -05:00 |
|
Atul Aggarwal
|
b292e37874
|
Bug 686775 - Matching external API version of StripWhitespace with internal version by adding stripping of \b. r=bsmedberg
|
2011-11-06 20:22:02 +05:30 |
|
Michael Wu
|
d8e503c38b
|
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
|
2011-09-28 23:19:26 -07:00 |
|
Neil Rashbrook
|
96fa789ca2
|
Bug 540322 Add some missing methods to the external string API r=bsmedberg
|
2011-03-25 11:39:38 +00:00 |
|
L. David Baron
|
d71ea7085b
|
Use char16_t when available, and when it is, don't test for -fshort-wchar. (Bug 502298) r=bsmedberg
|
2009-07-20 07:04:41 -04:00 |
|
Fred Jendrzejewski
|
8759b06c00
|
Bug 466622. Replace nsCStringArray with nsTArray<nsCString> for more consistent code and fewer heap allocations. r+sr=roc,r=bsmedberg
--HG--
extra : rebase_source : b963bf5de9d9c445b14620479691482512e0faf2
|
2009-01-22 17:15:34 +13:00 |
|
philringnalda@gmail.com
|
e20c3514d6
|
Bug 413477 - nsStringAPI needs RFind set of functions, patch by Prasad Sunkari (prasad@medhas.org), r=bsmedberg, a=beltzner
|
2008-04-08 23:01:13 -07:00 |
|
philringnalda@gmail.com
|
d90d948a45
|
Bug 380783 - nsStringAPI.h: no equivalent of IsVoid (tell if string is null), patch by Mook <mook.moz+mozbz@gmail.com>, r=bsmedberg/dbaron, sr=dbaron, a1.9=bz
|
2007-08-17 20:48:16 -07:00 |
|
jwalden@mit.edu
|
e3c4baccae
|
Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
|
2007-07-08 00:08:04 -07:00 |
|
kherron@fmailbox.com
|
2084922e5c
|
Bug 177150 - Some mozilla-config.h defines require additional cflags for embedders. Patch by <mook.moz+mozbz@gmail.com>. r=benjamin, sr=dbaron.
|
2007-06-16 13:02:15 -07:00 |
|
neil@parkwaycc.co.uk
|
94371423ae
|
Bug 379339 StringBegins/EndsWith inconsistent with nsReadableUtils.cpp r=bsmedberg sr=darin
|
2007-05-07 04:09:54 -07:00 |
|
hg@mozilla.com
|
465265d0d4
|
Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
|
2007-03-22 10:30:00 -07:00 |
|