Patchwork [2,of,6,V2] cext: make HgRevlogIndex_GetParents private again

login
register
mail settings
Submitter Pierre-Yves David
Date March 8, 2020, 9:06 p.m.
Message ID <b6ea7a94cdaea348eff4.1583701613@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/45617/
State Accepted
Headers show

Comments

Pierre-Yves David - March 8, 2020, 9:06 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1583682039 -3600
#      Sun Mar 08 16:40:39 2020 +0100
# Node ID b6ea7a94cdaea348eff4bc232a732e24f43469a8
# Parent  ac97907dc3f16b039213f54adb37d0a5b04eaf9b
# EXP-Topic rust-test-option
# Available At https://dev.heptapod.net/octobus/mercurial-devel/
#              hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r b6ea7a94cdae
cext: make HgRevlogIndex_GetParents private again

The rust's direct-ffi code need to access this function. Now that it
`direct-ffi` is no more. We can make this function `static` again.

This change was suggested by `Yuya Nishihara`.

Patch

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -208,7 +208,7 @@  static inline int index_get_parents(inde
  *
  * Returns 0 on success or -1 on failure.
  */
-int HgRevlogIndex_GetParents(PyObject *op, int rev, int *ps)
+static int HgRevlogIndex_GetParents(PyObject *op, int rev, int *ps)
 {
 	int tiprev;
 	if (!op || !HgRevlogIndex_Check(op) || !ps) {
diff --git a/mercurial/cext/revlog.h b/mercurial/cext/revlog.h
--- a/mercurial/cext/revlog.h
+++ b/mercurial/cext/revlog.h
@@ -14,6 +14,4 @@  extern PyTypeObject HgRevlogIndex_Type;
 
 #define HgRevlogIndex_Check(op) PyObject_TypeCheck(op, &HgRevlogIndex_Type)
 
-int HgRevlogIndex_GetParents(PyObject *op, int rev, int *ps);
-
 #endif /* _HG_REVLOG_H_ */