[Updated] D11384: dirstate-item: `dirstate_item_from_v1_data` replaces make_dirstate_item
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Sep 9 09:13:34 UTC 2021
Closed by commit rHG3337eec29d5b: dirstate-item: `dirstate_item_from_v1_data` replaces make_dirstate_item (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11384?vs=30174&id=30190
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11384/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11384
AFFECTED FILES
mercurial/cext/parsers.c
CHANGE DETAILS
diff --git a/mercurial/cext/parsers.c b/mercurial/cext/parsers.c
--- a/mercurial/cext/parsers.c
+++ b/mercurial/cext/parsers.c
@@ -44,21 +44,6 @@
return _dict_new_presized(expected_size);
}
-static inline dirstateItemObject *make_dirstate_item(char state, int mode,
- int size, int mtime)
-{
- dirstateItemObject *t =
- PyObject_New(dirstateItemObject, &dirstateItemType);
- if (!t) {
- return NULL;
- }
- t->state = state;
- t->mode = mode;
- t->size = size;
- t->mtime = mtime;
- return t;
-}
-
static PyObject *dirstate_item_new(PyTypeObject *subtype, PyObject *args,
PyObject *kwds)
{
@@ -201,7 +186,7 @@
}
};
-/* This will never change since it's bound to V1, unlike `make_dirstate_item`
+/* This will never change since it's bound to V1
*/
static inline dirstateItemObject *
dirstate_item_from_v1_data(char state, int mode, int size, int mtime)
@@ -795,7 +780,7 @@
/* See pure/parsers.py:pack_dirstate for why we do
* this. */
mtime = -1;
- mtime_unset = (PyObject *)make_dirstate_item(
+ mtime_unset = (PyObject *)dirstate_item_from_v1_data(
state, mode, size, mtime);
if (!mtime_unset) {
goto bail;
@@ -1088,7 +1073,7 @@
revlog_module_init(mod);
capsule = PyCapsule_New(
- make_dirstate_item,
+ dirstate_item_from_v1_data,
"mercurial.cext.parsers.make_dirstate_item_CAPI", NULL);
if (capsule != NULL)
PyModule_AddObject(mod, "make_dirstate_item_CAPI", capsule);
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210909/bab7797f/attachment-0002.html>
More information about the Mercurial-patches
mailing list