mercurial/cext/revlog.c
changeset 44512 166349510398
parent 44498 b55bec1ea972
child 44586 f8427841c8fc
equal deleted inserted replaced
44511:87b327de772c 44512:166349510398
    37 	int children[16];
    37 	int children[16];
    38 } nodetreenode;
    38 } nodetreenode;
    39 
    39 
    40 typedef struct {
    40 typedef struct {
    41 	int abi_version;
    41 	int abi_version;
       
    42 	Py_ssize_t (*index_length)(const indexObject *);
       
    43 	const char *(*index_node)(indexObject *, Py_ssize_t);
    42 	int (*index_parents)(PyObject *, int, int *);
    44 	int (*index_parents)(PyObject *, int, int *);
    43 } Revlog_CAPI;
    45 } Revlog_CAPI;
    44 
    46 
    45 /*
    47 /*
    46  * A base-16 trie for fast node->rev mapping.
    48  * A base-16 trie for fast node->rev mapping.
  2875 }
  2877 }
  2876 
  2878 
  2877 static Revlog_CAPI CAPI = {
  2879 static Revlog_CAPI CAPI = {
  2878     /* increment the abi_version field upon each change in the Revlog_CAPI
  2880     /* increment the abi_version field upon each change in the Revlog_CAPI
  2879        struct or in the ABI of the listed functions */
  2881        struct or in the ABI of the listed functions */
  2880     1,
  2882     2,
       
  2883     index_length,
       
  2884     index_node,
  2881     HgRevlogIndex_GetParents,
  2885     HgRevlogIndex_GetParents,
  2882 };
  2886 };
  2883 
  2887 
  2884 void revlog_module_init(PyObject *mod)
  2888 void revlog_module_init(PyObject *mod)
  2885 {
  2889 {