Skip to content

Commit a0e048c

Browse files
authored
Issue 224: cleaning setting string empty (#229)
* cleaning setting string enpty * apply arguments
1 parent cc7af49 commit a0e048c

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def add_filters(filters, pkgs, pkgs_data):
162162
# no-lto to be on the save side
163163
arguments = ['-std=c++17', '-Wall', '-Wextra', '-fdiagnostics-show-option',
164164
'-fno-lto']
165-
nexus_config.add_compiler_arguments(arguments)
165+
nexus_config.add_compiler_arguments(arguments)
166166

167167
# ----------------------------------------------------------------------------
168168
# creating the extension factories

src/cpp/h5cpp/numpy/hdf5_variable_strings_support.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,12 @@ struct VarLengthStringTrait<numpy::ArrayAdapter>
119119
PyObject *ptr;
120120
if(string == NULL)
121121
{
122-
char empty[] = {'\0'};
123-
string = empty;
124122
#if PY_VERSION_HEX >= 0x030d0000
125123
ptr = Py_GetConstant(Py_CONSTANT_EMPTY_STR);
126124
#elif PY_MAJOR_VERSION >= 3
127-
ptr = PyUnicode_FromString(string);
125+
ptr = PyUnicode_FromString("");
128126
#else
129-
ptr = PyString_FromString(string);
127+
ptr = PyString_FromString("");
130128
#endif
131129
}
132130
else

0 commit comments

Comments
 (0)