summaryrefslogtreecommitdiff
path: root/grc/core/Block.py
diff options
context:
space:
mode:
authorClayton Smith <argilo@gmail.com>2016-11-22 21:55:05 -0500
committerClayton Smith <argilo@gmail.com>2016-11-22 21:55:05 -0500
commitbebfb49c465c1854888ba37edb841cec213da533 (patch)
treec2564751b0355dbc074e62f65f4d9184bc1fb940 /grc/core/Block.py
parent96f7b5bf800322fff26f1f28a19772d6e517c3c9 (diff)
Support vector types in embedded Python blocks.
Diffstat (limited to 'grc/core/Block.py')
-rw-r--r--grc/core/Block.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/grc/core/Block.py b/grc/core/Block.py
index 737142442b..f8179b113f 100644
--- a/grc/core/Block.py
+++ b/grc/core/Block.py
@@ -462,10 +462,11 @@ class Block(Element):
iter_ports = iter(ports)
ports_new = []
port_current = next(iter_ports, None)
- for key, port_type in port_specs:
+ for key, port_type, vlen in port_specs:
reuse_port = (
port_current is not None and
port_current.get_type() == port_type and
+ port_current.get_vlen() == vlen and
(key.isdigit() or port_current.get_key() == key)
)
if reuse_port:
@@ -476,6 +477,8 @@ class Block(Element):
if port_type == 'message':
n['name'] = key
n['optional'] = '1'
+ if vlen > 1:
+ n['vlen'] = str(vlen)
port = platform.Port(block=self, n=n, dir=direction)
ports_new.append(port)
# replace old port list with new one