[Numpy-svn] [numpy/numpy] 0b062a: FIX: unchecked mallocs and Python operations
GitHub
noreply at github.com
Fri Aug 30 09:26:52 EDT 2013
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 0b062a8ca9d00584fe8934c84a99b174316f4734
https://github.com/numpy/numpy/commit/0b062a8ca9d00584fe8934c84a99b174316f4734
Author: Lars Buitinck <L.J.Buitinck at uva.nl>
Date: 2013-08-30 (Fri, 30 Aug 2013)
Changed paths:
M numpy/core/src/multiarray/arrayobject.c
M numpy/core/src/multiarray/buffer.c
M numpy/core/src/multiarray/ctors.c
Log Message:
-----------
FIX: unchecked mallocs and Python operations
Rewrote _tmp_string_t handling in buffer.c to use the fact that
realloc(NULL, n) is equivalent to malloc(n). There are still some
unchecked cases in this file.
Also changed some arguments to const and removed casts on malloc
return values; malloc returns void*, which is converted to any
other pointer automatically. Casting the return value of malloc
is more likely to hide bugs than to fix anything.
Commit: b76cb5b59817b82040f4b170f7e0b6d6a6b861c1
https://github.com/numpy/numpy/commit/b76cb5b59817b82040f4b170f7e0b6d6a6b861c1
Author: Lars Buitinck <L.J.Buitinck at uva.nl>
Date: 2013-08-30 (Fri, 30 Aug 2013)
Changed paths:
M numpy/core/src/multiarray/array_assign_array.c
M numpy/core/src/multiarray/multiarraymodule.c
Log Message:
-----------
MAINT: remove unused goto label and useless casts
Commit: ee1ec3f5517dd413161e7596b10b45ee10168843
https://github.com/numpy/numpy/commit/ee1ec3f5517dd413161e7596b10b45ee10168843
Author: Lars Buitinck <L.J.Buitinck at uva.nl>
Date: 2013-08-30 (Fri, 30 Aug 2013)
Changed paths:
M numpy/core/src/umath/ufunc_object.c
Log Message:
-----------
FIX: some more casts in ufunc_object
Introduced a helper function to get rid of repetitive code.
Commit: 0167ac1daa6adb058d646efd0790ce129059116a
https://github.com/numpy/numpy/commit/0167ac1daa6adb058d646efd0790ce129059116a
Author: Lars Buitinck <L.J.Buitinck at uva.nl>
Date: 2013-08-30 (Fri, 30 Aug 2013)
Changed paths:
M numpy/core/src/multiarray/arrayobject.c
M numpy/core/src/npysort/heapsort.c.src
M numpy/core/src/npysort/mergesort.c.src
Log Message:
-----------
FIX don't explicitly cast void* when final type is known
Commit: 78785a496440e0861561c13aafa104082d69fbe7
https://github.com/numpy/numpy/commit/78785a496440e0861561c13aafa104082d69fbe7
Author: Charles Harris <charlesr.harris at gmail.com>
Date: 2013-08-30 (Fri, 30 Aug 2013)
Changed paths:
M numpy/core/src/multiarray/array_assign_array.c
M numpy/core/src/multiarray/arrayobject.c
M numpy/core/src/multiarray/buffer.c
M numpy/core/src/multiarray/ctors.c
M numpy/core/src/multiarray/multiarraymodule.c
M numpy/core/src/npysort/heapsort.c.src
M numpy/core/src/npysort/mergesort.c.src
M numpy/core/src/umath/ufunc_object.c
Log Message:
-----------
Merge pull request #3655 from larsmans/c-fixes
FIX: unchecked mallocs and various other things
Compare: https://github.com/numpy/numpy/compare/b350089f440f...78785a496440
More information about the Numpy-svn
mailing list