From 24e31997fc9cd468e430e6f4a5542ac0490fb60b Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Fri, 27 Dec 2024 07:22:28 +0100 Subject: [PATCH] context-helpers.go: export functions no longer export control flags --- context-helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/context-helpers.go b/context-helpers.go index 64315c6..e30194a 100644 --- a/context-helpers.go +++ b/context-helpers.go @@ -29,7 +29,7 @@ func exportObjects(destCtx, sourceCtx ExprContext) { exportAll := CtrlIsEnabled(sourceCtx, control_export_all) // fmt.Printf("Exporting from sourceCtx [%p] to destCtx [%p] -- exportAll=%t\n", sourceCtx, destCtx, exportAll) // Export variables - for _, refName := range sourceCtx.EnumVars(func(name string) bool { return exportAll || name[0] == '@' }) { + for _, refName := range sourceCtx.EnumVars(func(name string) bool { return (exportAll || name[0] == '@') && !(name[0] == '_') }) { // fmt.Printf("\tExporting %q\n", refName) refValue, _ := sourceCtx.GetVar(refName) exportVar(destCtx, refName, refValue)