Skip to content

Commit fa851c3

Browse files
authored
Merge pull request #16 from deeptools/fix14
Fix #14, use correct pointer type
2 parents 697884f + 32dfd80 commit fa851c3

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

azure-pipelines.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ jobs:
88
vmImage: 'ubuntu-latest'
99
strategy:
1010
matrix:
11-
Python36:
12-
python.version: '3.6'
13-
Python37:
14-
python.version: '3.7'
1511
Python38:
1612
python.version: '3.8'
1713
Python39:
1814
python.version: '3.9'
1915
Python310:
2016
python.version: '3.10'
17+
Python311:
18+
python.version: '3.11'
2119
maxParallel: 5
2220

2321
steps:

lib2bit/2bit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void bytes2bases(char *seq, uint8_t *byte, uint32_t sz, int offset) {
6969

7070
// Deal with the first partial byte
7171
if(offset != 0) {
72-
while(offset < 4) {
72+
while(offset < 4 && pos < sz) {
7373
seq[pos++] = byte2base(foo, offset++);
7474
}
7575
if(pos >= sz) return;

py2bit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ static PyObject *py2bitOpen(PyObject *self, PyObject *args, PyObject *kwds) {
3232
}
3333

3434
PyObject *py2bitEnter(pyTwoBit_t *self, PyObject *args) {
35-
pyTwoBit_t *pytb = self->tb;
35+
TwoBit *tb = self->tb;
3636

37-
if(!pytb) {
37+
if(!tb) {
3838
PyErr_SetString(PyExc_RuntimeError, "The 2bit file handle is not open!");
3939
return NULL;
4040
}

py2bit.h

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

4-
#define pyTwoBitVersion "0.3.1"
4+
#define pyTwoBitVersion "0.3.2"
55

66
typedef struct {
77
PyObject_HEAD

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[metadata]
2-
description-file = README.md
2+
description_file = README.md

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
include_dirs = ['lib2bit', sysconfig.get_config_var("INCLUDEPY")])
1818

1919
setup(name = 'py2bit',
20-
version = '0.3.1',
20+
version = '0.3.2',
2121
description = 'A package for accessing 2bit files using lib2bit',
2222
author = "Devon P. Ryan",
2323
author_email = "dpryan79@gmail.com",

0 commit comments

Comments
 (0)