D1169: cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls

2017-10-18 Thread durin42 (Augie Fackler)
durin42 added a comment.


  I figured this out by finding a bug at Google on this topic, and then djasper 
showed me a workaround and said he'd look again at fixing the other case we're 
stuck on.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1169

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D1169: cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls

2017-10-18 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6ece4a85c350: cext: add /* header */ comment to all 
PyVarObject_HEAD_INIT() calls (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1169?vs=2951=2978

REVISION DETAIL
  https://phab.mercurial-scm.org/D1169

AFFECTED FILES
  mercurial/cext/manifest.c
  mercurial/cext/osutil.c
  mercurial/cext/parsers.c
  mercurial/cext/revlog.c

CHANGE DETAILS

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1991,7 +1991,7 @@
 };
 
 static PyTypeObject indexType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.index",   /* tp_name */
sizeof(indexObject),   /* tp_basicsize */
0, /* tp_itemsize */
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -195,7 +195,7 @@
 };
 
 PyTypeObject dirstateTupleType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"dirstate_tuple",  /* tp_name */
sizeof(dirstateTupleObject),/* tp_basicsize */
0, /* tp_itemsize */
diff --git a/mercurial/cext/osutil.c b/mercurial/cext/osutil.c
--- a/mercurial/cext/osutil.c
+++ b/mercurial/cext/osutil.c
@@ -121,7 +121,7 @@
 }
 
 static PyTypeObject listdir_stat_type = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"osutil.stat", /*tp_name*/
sizeof(struct listdir_stat), /*tp_basicsize*/
0, /*tp_itemsize*/
diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c
--- a/mercurial/cext/manifest.c
+++ b/mercurial/cext/manifest.c
@@ -262,7 +262,7 @@
 #endif
 
 static PyTypeObject lazymanifestEntriesIterator = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest.entriesiterator", /*tp_name */
sizeof(lmIter),  /*tp_basicsize */
0,   /*tp_itemsize */
@@ -310,7 +310,7 @@
 #endif
 
 static PyTypeObject lazymanifestKeysIterator = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest.keysiterator", /*tp_name */
sizeof(lmIter),  /*tp_basicsize */
0,   /*tp_itemsize */
@@ -890,7 +890,7 @@
 #endif
 
 static PyTypeObject lazymanifestType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest",   /* tp_name */
sizeof(lazymanifest), /* tp_basicsize */
0,/* tp_itemsize */



To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D1169: cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls

2017-10-18 Thread indygreg (Gregory Szorc)
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  Oh, I was wondering how to do this. AFAICT this feature is not documented at 
https://clang.llvm.org/docs/ClangFormat.html or 
https://clang.llvm.org/docs/ClangFormatStyleOptions.html. Boo.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1169

To: durin42, #hg-reviewers, indygreg
Cc: indygreg, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D1169: cext: add /* header */ comment to all PyVarObject_HEAD_INIT() calls

2017-10-17 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  This gives clang-format the right notion about formatting these struct
  initializers, therefore allowing us to automatically format several
  additional files.
  
  1. skip-blame because this is just a content-free comment addition

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1169

AFFECTED FILES
  mercurial/cext/manifest.c
  mercurial/cext/osutil.c
  mercurial/cext/parsers.c
  mercurial/cext/revlog.c

CHANGE DETAILS

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1991,7 +1991,7 @@
 };
 
 static PyTypeObject indexType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.index",   /* tp_name */
sizeof(indexObject),   /* tp_basicsize */
0, /* tp_itemsize */
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -195,7 +195,7 @@
 };
 
 PyTypeObject dirstateTupleType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"dirstate_tuple",  /* tp_name */
sizeof(dirstateTupleObject),/* tp_basicsize */
0, /* tp_itemsize */
diff --git a/mercurial/cext/osutil.c b/mercurial/cext/osutil.c
--- a/mercurial/cext/osutil.c
+++ b/mercurial/cext/osutil.c
@@ -121,7 +121,7 @@
 }
 
 static PyTypeObject listdir_stat_type = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"osutil.stat", /*tp_name*/
sizeof(struct listdir_stat), /*tp_basicsize*/
0, /*tp_itemsize*/
diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c
--- a/mercurial/cext/manifest.c
+++ b/mercurial/cext/manifest.c
@@ -262,7 +262,7 @@
 #endif
 
 static PyTypeObject lazymanifestEntriesIterator = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest.entriesiterator", /*tp_name */
sizeof(lmIter),  /*tp_basicsize */
0,   /*tp_itemsize */
@@ -310,7 +310,7 @@
 #endif
 
 static PyTypeObject lazymanifestKeysIterator = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest.keysiterator", /*tp_name */
sizeof(lmIter),  /*tp_basicsize */
0,   /*tp_itemsize */
@@ -890,7 +890,7 @@
 #endif
 
 static PyTypeObject lazymanifestType = {
-   PyVarObject_HEAD_INIT(NULL, 0)
+   PyVarObject_HEAD_INIT(NULL, 0) /* header */
"parsers.lazymanifest",   /* tp_name */
sizeof(lazymanifest), /* tp_basicsize */
0,/* tp_itemsize */



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel