Show More
@@ -44,21 +44,6 b' static PyObject *dict_new_presized(PyObj' | |||||
44 | return _dict_new_presized(expected_size); |
|
44 | return _dict_new_presized(expected_size); | |
45 | } |
|
45 | } | |
46 |
|
46 | |||
47 | static inline dirstateItemObject *make_dirstate_item(char state, int mode, |
|
|||
48 | int size, int mtime) |
|
|||
49 | { |
|
|||
50 | dirstateItemObject *t = |
|
|||
51 | PyObject_New(dirstateItemObject, &dirstateItemType); |
|
|||
52 | if (!t) { |
|
|||
53 | return NULL; |
|
|||
54 | } |
|
|||
55 | t->state = state; |
|
|||
56 | t->mode = mode; |
|
|||
57 | t->size = size; |
|
|||
58 | t->mtime = mtime; |
|
|||
59 | return t; |
|
|||
60 | } |
|
|||
61 |
|
||||
62 | static PyObject *dirstate_item_new(PyTypeObject *subtype, PyObject *args, |
|
47 | static PyObject *dirstate_item_new(PyTypeObject *subtype, PyObject *args, | |
63 | PyObject *kwds) |
|
48 | PyObject *kwds) | |
64 | { |
|
49 | { | |
@@ -201,7 +186,7 b' static PyObject *dirstate_item_need_dela' | |||||
201 | } |
|
186 | } | |
202 | }; |
|
187 | }; | |
203 |
|
188 | |||
204 |
/* This will never change since it's bound to V1 |
|
189 | /* This will never change since it's bound to V1 | |
205 | */ |
|
190 | */ | |
206 | static inline dirstateItemObject * |
|
191 | static inline dirstateItemObject * | |
207 | dirstate_item_from_v1_data(char state, int mode, int size, int mtime) |
|
192 | dirstate_item_from_v1_data(char state, int mode, int size, int mtime) | |
@@ -795,7 +780,7 b' static PyObject *pack_dirstate(PyObject ' | |||||
795 | /* See pure/parsers.py:pack_dirstate for why we do |
|
780 | /* See pure/parsers.py:pack_dirstate for why we do | |
796 | * this. */ |
|
781 | * this. */ | |
797 | mtime = -1; |
|
782 | mtime = -1; | |
798 |
mtime_unset = (PyObject *) |
|
783 | mtime_unset = (PyObject *)dirstate_item_from_v1_data( | |
799 | state, mode, size, mtime); |
|
784 | state, mode, size, mtime); | |
800 | if (!mtime_unset) { |
|
785 | if (!mtime_unset) { | |
801 | goto bail; |
|
786 | goto bail; | |
@@ -1088,7 +1073,7 b' static void module_init(PyObject *mod)' | |||||
1088 | revlog_module_init(mod); |
|
1073 | revlog_module_init(mod); | |
1089 |
|
1074 | |||
1090 | capsule = PyCapsule_New( |
|
1075 | capsule = PyCapsule_New( | |
1091 |
|
|
1076 | dirstate_item_from_v1_data, | |
1092 | "mercurial.cext.parsers.make_dirstate_item_CAPI", NULL); |
|
1077 | "mercurial.cext.parsers.make_dirstate_item_CAPI", NULL); | |
1093 | if (capsule != NULL) |
|
1078 | if (capsule != NULL) | |
1094 | PyModule_AddObject(mod, "make_dirstate_item_CAPI", capsule); |
|
1079 | PyModule_AddObject(mod, "make_dirstate_item_CAPI", capsule); |
General Comments 0
You need to be logged in to leave comments.
Login now