Skip to content

Commit 20a3a14

Browse files
author
Irwin Zaid
committed
Fixed uninitialized variable issue
1 parent 6d014a4 commit 20a3a14

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

dynd/src/type_functions.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,13 @@ dynd::ndt::type pydynd::_type_getitem(const dynd::ndt::type &d,
413413
PyObject *pydynd::_type_array_property_names(const ndt::type &d)
414414
{
415415
std::map<std::string, nd::callable> properties;
416-
size_t count;
417416
if (!d.is_builtin()) {
418417
d.extended()->get_dynamic_array_properties(properties);
419418
}
420419
else {
421420
get_builtin_type_dynamic_array_properties(d.get_type_id(), properties);
422421
}
423-
pyobject_ownref result(PyList_New(count));
422+
pyobject_ownref result(PyList_New(properties.size()));
424423
int i = 0;
425424
for (const auto &pair : properties) {
426425
const std::string &s = pair.first;

0 commit comments

Comments
 (0)