diff mercurial/cext/parsers.c @ 48157:b45c4dc65adc

dirstate-item: drop the legacy new_added constructor Nobody is calling it anymore. Its purposes has been filled. Differential Revision: https://phab.mercurial-scm.org/D11601
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 09:16:53 +0200
parents b2af515b4faf
children 252d2f3f0d17
line wrap: on
line diff
--- a/mercurial/cext/parsers.c	Fri Oct 01 09:15:03 2021 +0200
+++ b/mercurial/cext/parsers.c	Fri Oct 01 09:16:53 2021 +0200
@@ -347,23 +347,6 @@
 	return (PyObject *)dirstate_item_from_v1_data(state, mode, size, mtime);
 };
 
-/* constructor to help legacy API to build a new "added" item
-
-Should eventually be removed */
-static PyObject *dirstate_item_new_added(PyTypeObject *subtype)
-{
-	dirstateItemObject *t;
-	t = (dirstateItemObject *)subtype->tp_alloc(subtype, 1);
-	if (!t) {
-		return NULL;
-	}
-	t->flags = dirstate_flag_wc_tracked;
-	t->mode = 0;
-	t->size = 0;
-	t->mtime = 0;
-	return (PyObject *)t;
-};
-
 /* constructor to help legacy API to build a new "from_p2" item
 
 Should eventually be removed */
@@ -492,9 +475,6 @@
      "True if the stored mtime would be ambiguous with the current time"},
     {"from_v1_data", (PyCFunction)dirstate_item_from_v1_meth,
      METH_VARARGS | METH_CLASS, "build a new DirstateItem object from V1 data"},
-    {"new_added", (PyCFunction)dirstate_item_new_added,
-     METH_NOARGS | METH_CLASS,
-     "constructor to help legacy API to build a new \"added\" item"},
     {"new_from_p2", (PyCFunction)dirstate_item_new_from_p2,
      METH_NOARGS | METH_CLASS,
      "constructor to help legacy API to build a new \"from_p2\" item"},