kirr has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/40071?usp=email )
Change subject: trx_toolkit/data_msg: Replace `from gsm_shared import *` with explicit import and at C level ......................................................................
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):