Skip to content

Commit bba424d

Browse files
Prerak SinghPrerak Singh
authored andcommitted
bug fix
1 parent f028882 commit bba424d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pydatastructs/graphs/_backend/cpp/llvm_adjacency_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def _create_add_vertex(self):
379379
self.builder.mul(current_capacity, ir.Constant(self.int_type, 2))
380380
)
381381

382-
ptr_size = ir.Constant(self.int64_type, 8)
382+
ptr_size = ir.Constant(self.int64_type, self.node_type.as_pointer().get_abi_size(self._get_target_data()))
383383
new_size_64 = self.builder.mul(self.builder.zext(new_capacity, self.int64_type), ptr_size)
384384
new_array_mem = self.builder.call(self.malloc_func, [new_size_64])
385385
new_array = self.builder.bitcast(new_array_mem, self.node_type.as_pointer().as_pointer())

0 commit comments

Comments
 (0)