Skip to content

Commit 77c9f02

Browse files
Prerak SinghPrerak Singh
authored andcommitted
bug fix
1 parent 3fc8e03 commit 77c9f02

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

pydatastructs/graphs/_backend/cpp/AdjacencyList.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ PyTypeObject AdjacencyListGraphType = {
370370
0, // tp_setattro
371371
0, // tp_as_buffer
372372
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags
373-
"Adjacency List Graph data structure", // tp_doc
373+
"Adjacency List Graph", // tp_doc
374374
0, // tp_traverse
375375
0, // tp_clear
376376
0, // tp_richcompare

pydatastructs/graphs/_backend/cpp/AdjacencyMatrix.hpp

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -237,44 +237,44 @@ static PyMethodDef AdjacencyMatrixGraph_methods[] = {
237237
};
238238

239239
PyTypeObject AdjacencyMatrixGraphType = {
240-
PyVarObject_HEAD_INIT(NULL, 0)
241-
.tp_name = "_graph.AdjacencyMatrixGraph",
242-
.tp_basicsize = sizeof(AdjacencyMatrixGraph),
243-
.tp_itemsize = 0,
244-
.tp_dealloc = (destructor)AdjacencyMatrixGraph_dealloc,
245-
.tp_print = 0,
246-
.tp_getattr = 0,
247-
.tp_setattr = 0,
248-
.tp_as_async = 0,
249-
.tp_repr = 0,
250-
.tp_as_number = 0,
251-
.tp_as_sequence = 0,
252-
.tp_as_mapping = 0,
253-
.tp_hash = 0,
254-
.tp_call = 0,
255-
.tp_str = 0,
256-
.tp_getattro = 0,
257-
.tp_setattro = 0,
258-
.tp_as_buffer = 0,
259-
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
260-
.tp_doc = "Adjacency matrix graph",
261-
.tp_traverse = 0,
262-
.tp_clear = 0,
263-
.tp_richcompare = 0,
264-
.tp_weaklistoffset = 0,
265-
.tp_iter = 0,
266-
.tp_iternext = 0,
267-
.tp_methods = AdjacencyMatrixGraph_methods,
268-
.tp_members = 0,
269-
.tp_getset = 0,
270-
.tp_base = 0,
271-
.tp_dict = 0,
272-
.tp_descr_get = 0,
273-
.tp_descr_set = 0,
274-
.tp_dictoffset = offsetof(AdjacencyMatrixGraph, dict),
275-
.tp_init = 0,
276-
.tp_alloc = 0,
277-
.tp_new = AdjacencyMatrixGraph_new,
240+
PyVarObject_HEAD_INIT(NULL, 0) // ob_base
241+
"_graph.AdjacencyMatrixGraph", // tp_name
242+
sizeof(AdjacencyMatrixGraph), // tp_basicsize
243+
0, // tp_itemsize
244+
(destructor)AdjacencyMatrixGraph_dealloc, // tp_dealloc
245+
0, // tp_vectorcall_offset or tp_print (removed in Python 3.9)
246+
0, // tp_getattr
247+
0, // tp_setattr
248+
0, // tp_as_async / tp_reserved
249+
0, // tp_repr
250+
0, // tp_as_number
251+
0, // tp_as_sequence
252+
0, // tp_as_mapping
253+
0, // tp_hash
254+
0, // tp_call
255+
0, // tp_str
256+
0, // tp_getattro
257+
0, // tp_setattro
258+
0, // tp_as_buffer
259+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, // tp_flags
260+
"Adjacency matrix graph", // tp_doc
261+
0, // tp_traverse
262+
0, // tp_clear
263+
0, // tp_richcompare
264+
0, // tp_weaklistoffset
265+
0, // tp_iter
266+
0, // tp_iternext
267+
AdjacencyMatrixGraph_methods, // tp_methods
268+
0, // tp_members
269+
0, // tp_getset
270+
0, // tp_base
271+
0, // tp_dict
272+
0, // tp_descr_get
273+
0, // tp_descr_set
274+
offsetof(AdjacencyMatrixGraph, dict), // tp_dictoffset
275+
0, // tp_init
276+
0, // tp_alloc
277+
AdjacencyMatrixGraph_new // tp_new
278278
};
279279

280280
#endif

0 commit comments

Comments
 (0)