ENH: update lemon version and linkage directive (#1768)

- replace `%namespace` directive with simpler `%static` directive.

  We always encapsulate Lemon parser routines in an anonymous
  namespace, so a simpler static linkage directive suffices.

  This reduces the size of the Lemon patch (program and template).
This commit is contained in:
Mark Olesen
2020-07-10 11:26:29 +02:00
parent a088bda4d2
commit 6365bab800
8 changed files with 271 additions and 456 deletions

View File

@ -7,7 +7,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -120,7 +120,8 @@ tmp_management()
// ------------------------------------------------------------------------- //
%namespace {}
// File-scope visibility for exposed Lemon parser routines
%static
// Use extra argument for the return value
%extra_context { Foam::expressions::fieldExpr::parseDriver* driver }

View File

@ -7,7 +7,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -66,7 +66,8 @@ tmp_management()
// ------------------------------------------------------------------------- //
%namespace {}
// File-scope visibility for exposed Lemon parser routines
%static
// Use extra argument for the return value
%extra_context { Foam::expressions::patchExpr::parseDriver* driver }

View File

@ -7,7 +7,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -99,7 +99,8 @@ dnl
// ------------------------------------------------------------------------- //
%namespace {}
// File-scope visibility for exposed Lemon parser routines
%static
// Use extra argument for the return value
%extra_context { Foam::expressions::volumeExpr::parseDriver* driver }