kirr has uploaded this change for review.

View Change

trx_toolkit/data_msg: Replace `from gsm_shared import *` with explicit import and at C level

gsm_shared is currently pure-py module, but still we can import needed
constants and set them to C-level typed variables. It is both goods: all
imports are explicit, and access to the constant now go faster instead
of going through py-level module dict lookup.

Change-Id: Ica8c73d6136053845415bdece48b24a7df6520be
---
M src/target/trx_toolkit/data_msg.pyx
1 file changed, 5 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/71/40071/1
diff --git a/src/target/trx_toolkit/data_msg.pyx b/src/target/trx_toolkit/data_msg.pyx
index af0aac6..0da4f7c 100644
--- a/src/target/trx_toolkit/data_msg.pyx
+++ b/src/target/trx_toolkit/data_msg.pyx
@@ -25,7 +25,11 @@
from typing import List
from enum import Enum
from array import array
-from gsm_shared import *
+
+import gsm_shared
+cdef int GMSK_BURST_LEN = gsm_shared.GMSK_BURST_LEN
+cdef int EDGE_BURST_LEN = gsm_shared.EDGE_BURST_LEN
+cdef int GSM_HYPERFRAME = gsm_shared.GSM_HYPERFRAME

# _bu2s converts unsigned byte to signed.
def _bu2s(x):

To view, visit change 40071. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ica8c73d6136053845415bdece48b24a7df6520be
Gerrit-Change-Number: 40071
Gerrit-PatchSet: 1
Gerrit-Owner: kirr <kirr@nexedi.com>
Gerrit-CC: fixeria <vyanitskiy@sysmocom.de>
Gerrit-CC: osmith <osmith@sysmocom.de>
Gerrit-CC: pespin <pespin@sysmocom.de>