Skip to content

Commit aab0c43

Browse files
committed
Initial commit
1 parent 4fd0156 commit aab0c43

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/python-kai.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ static PyObject* get_uint(const biguint_t value) {
343343
return Py_None;
344344
}
345345

346-
result = PyBool_FromLong(value);
346+
result = PyLong_FromLongLong(value);
347347

348348
return result;
349349

@@ -366,13 +366,13 @@ static PyObject* get_byterange(const struct M3U8ByteRange* const byterange) {
366366
goto end;
367367
}
368368

369-
length = PyBool_FromLong(byterange->length);
369+
length = PyLong_FromLongLong(byterange->length);
370370

371371
if (length == NULL) {
372372
goto end;
373373
}
374374

375-
offset = PyBool_FromLong(byterange->offset);
375+
offset = PyLong_FromLongLong(byterange->offset);
376376

377377
if (offset == NULL) {
378378
goto end;
@@ -426,13 +426,13 @@ static PyObject* get_resolution(const struct M3U8Resolution* const resolution) {
426426
goto end;
427427
}
428428

429-
width = PyBool_FromLong(resolution->width);
429+
width = PyLong_FromLongLong(resolution->width);
430430

431431
if (width == NULL) {
432432
goto end;
433433
}
434434

435-
height = PyBool_FromLong(resolution->height);
435+
height = PyLong_FromLongLong(resolution->height);
436436

437437
if (height == NULL) {
438438
goto end;
@@ -649,7 +649,7 @@ static PyObject* get_segments(
649649
for (subindex = 0; subindex < segment->key.keyformatversions.offset; subindex++) {
650650
const int value = segment->key.keyformatversions.items[subindex];
651651

652-
PyObject* item = PyBool_FromLong(value);
652+
PyObject* item = PyLong_FromLongLong(value);
653653

654654
if (item == NULL) {
655655
status = 1;

0 commit comments

Comments
 (0)