Skip to content

Commit

Permalink
Pull in changes from PR #1902
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Nov 25, 2024
1 parent 4ee2c4f commit 1c3967f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/py-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ jobs:
strategy:
matrix:
platform: ${{ (inputs.all-platforms && fromJSON('["ubuntu-latest", "macos-latest", "windows-latest"]')) || fromJSON('["ubuntu-latest"]') }}
python-version: ${{ (inputs.all-platforms && fromJSON('["3.10", "3.11", "3.12"]')) || fromJSON('["3.12"]') }}
runs-on: ${{ matrix.platform }}
steps:
- name: Check out lingua-franca repository
Expand All @@ -36,7 +37,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: ${{ matrix.python-version }}
- name: Install dependencies OS X
run: |
brew install coreutils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -486,9 +486,6 @@ protected void generateUserPreamblesForReactor(Reactor reactor, CodeBuilder src)
@Override
protected void generateReactorClassHeaders(
TypeParameterizedReactor tpr, String headerName, CodeBuilder header, CodeBuilder src) {
header.pr(
PythonPreambleGenerator.generateCIncludeStatements(
targetConfig, targetLanguageIsCpp(), hasModalReactors));
super.generateReactorClassHeaders(tpr, headerName, header, src);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public static String generatePythonListForContainedBank(
" }",
" /* Release the thread. No Python API allowed beyond this point. */",
" PyGILState_Release(gstate);",
" Py_FinalizeEx();",
" exit(1);",
" }",
"}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static String generateCDefineDirectives(
public static String generateCIncludeStatements(
TargetConfig targetConfig, boolean CCppMode, boolean hasModalReactors) {
CodeBuilder code = new CodeBuilder();
code.pr(CPreambleGenerator.generateIncludeStatements(targetConfig, CCppMode));
code.pr("#include \"pythontarget.h\"");
code.pr(CPreambleGenerator.generateIncludeStatements(targetConfig, CCppMode));
if (hasModalReactors) {
code.pr("#include \"include/modal_models/definitions.h\"");
}
Expand Down

0 comments on commit 1c3967f

Please sign in to comment.