Skip to content

Commit f15feac

Browse files
committed
python3-pyliblo3: fix build with Cython 3.1
1 parent 9655ad0 commit f15feac

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
From 6b53ac0f1768f5f2f017b7011030ef6461366639 Mon Sep 17 00:00:00 2001
2+
From: Muhammad Alfi Syahrin <malfisya.dev@hotmail.com>
3+
Date: Tue, 17 Jun 2025 19:58:19 +0700
4+
Subject: [PATCH] Fix compilation with Cython 3.1.2
5+
6+
---
7+
pyliblo3/_liblo.pyx | 6 +++---
8+
1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+
diff --git a/pyliblo3/_liblo.pyx b/pyliblo3/_liblo.pyx
11+
index 4fa70df..dcc4da9 100644
12+
--- a/pyliblo3/_liblo.pyx
13+
+++ b/pyliblo3/_liblo.pyx
14+
@@ -971,7 +971,7 @@ cdef class Message:
15+
if t == 'i':
16+
lo_message_add_int32(self._message, int(value))
17+
elif t == 'h':
18+
- lo_message_add_int64(self._message, long(value))
19+
+ lo_message_add_int64(self._message, int(value))
20+
elif t == 'f':
21+
lo_message_add_float(self._message, float(value))
22+
elif t == 'd':
23+
@@ -1012,7 +1012,7 @@ cdef class Message:
24+
lo_message_add_true(self._message)
25+
elif value is False:
26+
lo_message_add_false(self._message)
27+
- elif isinstance(value, (int, long)):
28+
+ elif isinstance(value, (int)):
29+
try:
30+
lo_message_add_int32(self._message, <int32_t>value)
31+
except OverflowError:
32+
@@ -1067,7 +1067,7 @@ cdef class Bundle:
33+
34+
if len(messages) and not isinstance(messages[0], Message):
35+
t = messages[0]
36+
- if isinstance(t, (float, int, long)):
37+
+ if isinstance(t, (float, int)):
38+
tt = _double_to_timetag(t)
39+
elif isinstance(t, tuple) and len(t) == 2:
40+
tt.sec, tt.frac = t

srcpkgs/python3-pyliblo3/template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Template file for 'python3-pyliblo3'
22
pkgname=python3-pyliblo3
33
version=0.16.3
4-
revision=1
4+
revision=2
55
build_style=python3-module
66
hostmakedepends="python3-setuptools python3-Cython"
77
makedepends="python3-devel liblo-devel"

0 commit comments

Comments
 (0)