Skip to content

Commit 7cfb373

Browse files
authored
4.6.1 - Disable attribute packed for HAL (#99)
1 parent 11ff8c8 commit 7cfb373

File tree

11 files changed

+19
-10
lines changed

11 files changed

+19
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
8585
- run: |
8686
mk python-release owner=libre-embedded \
87-
repo=ifgen version=4.6.0
87+
repo=ifgen version=4.6.1
8888
if: |
8989
matrix.python-version == '3.13'
9090
&& matrix.system == 'ubuntu-latest'

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
=====================================
33
generator=datazen
44
version=3.2.3
5-
hash=8d3c526a8528a19206c3cbb830964859
5+
hash=b1734afc9a17480fd92d42eb65e351f9
66
=====================================
77
-->
88

9-
# ifgen ([4.6.0](https://pypi.org/project/ifgen/))
9+
# ifgen ([4.6.1](https://pypi.org/project/ifgen/))
1010

1111
[![python](https://img.shields.io/pypi/pyversions/ifgen.svg)](https://pypi.org/project/ifgen/)
1212
![Build Status](https://github.com/libre-embedded/ifgen/workflows/Python%20Package/badge.svg)

config

ifgen/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# =====================================
22
# generator=datazen
33
# version=3.2.3
4-
# hash=1d9a445cd0a6b0e0126151d1aa677943
4+
# hash=940874292201d38dfaaf344ff5181488
55
# =====================================
66

77
"""
@@ -10,4 +10,4 @@
1010

1111
DESCRIPTION = "An interface generator for distributed computing."
1212
PKG_NAME = "ifgen"
13-
VERSION = "4.6.0"
13+
VERSION = "4.6.1"

ifgen/config/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def init(self, data: _JsonObject) -> None:
4444
"stream",
4545
"methods",
4646
"default_endianness",
47+
"packed",
4748
]
4849
struct: dict[str, Any]
4950
for struct in data.get("structs", {}).values(): # type: ignore

ifgen/data/schemas/Config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ properties:
7979
unit_test:
8080
type: boolean
8181
default: true
82+
packed:
83+
type: boolean
84+
default: true
8285

8386
# https://en.cppreference.com/w/cpp/types/endian
8487
default_endianness:

ifgen/data/schemas/Struct.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ properties:
1919
type: boolean
2020
unit_test:
2121
type: boolean
22+
packed:
23+
type: boolean
2224
default_endianness:
2325
type: string
2426
enum: [little, big, native]

ifgen/struct/header.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,10 @@ def struct_instance(
164164
def cpp_struct_header(task: GenerateTask, writer: IndentedFileWriter) -> None:
165165
"""Create the contents of a C++ struct header file."""
166166

167-
attributes = ["gnu::packed"]
168-
writer.write(f"struct [[{', '.join(attributes)}]] {task.name}")
167+
attributes = ["gnu::packed"] if task.instance["packed"] else None
168+
attribute_str = f"[[{', '.join(attributes)}]]" if attributes else ""
169+
writer.write(f"struct {attribute_str} {task.name}")
170+
169171
with writer.scope(suffix=";"):
170172
writer.c_comment("Constant attributes.")
171173
with writer.trailing_comment_lines(

ifgen/svd/task.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def generate_configs(self, path: Path, config: SvdConfig) -> None:
110110
"codec": False,
111111
"methods": False,
112112
"unit_test": False,
113+
"packed": False,
113114
},
114115
"enum": {"use_map": False, "identifier": False},
115116
},

local/variables/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
22
major: 4
33
minor: 6
4-
patch: 0
4+
patch: 1
55
entry: ig

0 commit comments

Comments
 (0)