Skip to content

Commit 06b7232

Browse files
committed
Fix segfault when writing bigWig files and NOT using numpy
1 parent e0eb57e commit 06b7232

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pyBigWig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,14 +928,14 @@ int canAppend(pyBigWigFile_t *self, int desiredType, PyObject *chroms, PyObject
928928
foo = PyArray_GETPTR1((PyArrayObject*)chroms, i);
929929
tmp = PyArray_GETITEM((PyArrayObject*)chroms, foo);
930930
tid = bwGetTid(bw, PyString_AsString(tmp));
931+
Py_DECREF(tmp);
931932
} else {
932933
#endif
933934
tmp = PyList_GetItem(chroms, i);
934935
tid = bwGetTid(bw, PyString_AsString(tmp));
935936
#ifdef WITHNUMPY
936937
}
937938
#endif
938-
Py_DECREF(tmp);
939939
if(tid != (uint32_t) self->lastTid) return 0;
940940
}
941941

pyBigWig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <structmember.h>
33
#include "bigWig.h"
44

5-
#define pyBigWigVersion "0.3.8"
5+
#define pyBigWigVersion "0.3.9"
66

77
typedef struct {
88
PyObject_HEAD

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@
5858
include_dirs = include_dirs)
5959

6060
setup(name = 'pyBigWig',
61-
version = '0.3.8',
61+
version = '0.3.9',
6262
description = 'A package for accessing bigWig files using libBigWig',
6363
author = "Devon P. Ryan",
6464
author_email = "[email protected]",
6565
url = "https://github.com/dpryan79/pyBigWig",
66-
download_url = "https://github.com/dpryan79/pyBigWig/tarball/0.3.8",
66+
download_url = "https://github.com/dpryan79/pyBigWig/tarball/0.3.9",
6767
keywords = ["bioinformatics", "bigWig", "bigBed"],
6868
classifier = ["Development Status :: 5 - Production/Stable",
6969
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)