Repository: lucy-clownfish
Updated Branches:
  refs/heads/master 137f74977 -> a713a7aad


Kludge file location from Caller().

The behavior of Caller() is not guaranteed, and sometimes contains
artifacts of optimization.  Work around its unpredictability by adding
another case.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/97e6c4d2
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/97e6c4d2
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/97e6c4d2

Branch: refs/heads/master
Commit: 97e6c4d20f8eaf4bf792c04b768a4f06861f3644
Parents: 137f749
Author: Marvin Humphrey <mar...@rectangular.com>
Authored: Wed Feb 14 18:57:18 2018 -0800
Committer: Marvin Humphrey <mar...@rectangular.com>
Committed: Wed Feb 14 18:57:18 2018 -0800

----------------------------------------------------------------------
 compiler/go/build.go | 3 +++
 runtime/go/build.go  | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/97e6c4d2/compiler/go/build.go
----------------------------------------------------------------------
diff --git a/compiler/go/build.go b/compiler/go/build.go
index 80612f5..14ee90a 100644
--- a/compiler/go/build.go
+++ b/compiler/go/build.go
@@ -41,6 +41,9 @@ var cfIncludeDir string
 
 func init() {
        _, buildGO, _, _ = runtime.Caller(1)
+       if buildGO == "<autogenerated>" {
+               _, buildGO, _, _ = runtime.Caller(0)
+       }
        buildDir = path.Dir(buildGO)
        configGO = path.Join(buildDir, "cfc", "config.go")
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/97e6c4d2/runtime/go/build.go
----------------------------------------------------------------------
diff --git a/runtime/go/build.go b/runtime/go/build.go
index 6990749..0df28ae 100644
--- a/runtime/go/build.go
+++ b/runtime/go/build.go
@@ -44,6 +44,9 @@ var installedLibPath string
 
 func init() {
        _, buildGO, _, _ = runtime.Caller(1)
+       if buildGO == "<autogenerated>" {
+               _, buildGO, _, _ = runtime.Caller(0)
+       }
        buildDir = path.Dir(buildGO)
        configGO = path.Join(buildDir, "clownfish", "config.go")
        cfbindGO = path.Join(buildDir, "clownfish", "cfbind.go")

Reply via email to