summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruser <user@localhost.localdomain>2019-12-09 07:51:46 -0800
committeruser <user@localhost.localdomain>2019-12-09 07:51:46 -0800
commit0e40f5829a880ba63a3a8603e4babf2c2f7659e5 (patch)
treea956a7393d66e1bd9e1547737b89b3bd701113ec
parent12793ac154b8c9b2e9bb8869cb72bbc1a438dc3d (diff)
downloadstandingwithresilience-0e40f5829a880ba63a3a8603e4babf2c2f7659e5.tar.gz
standingwithresilience-0e40f5829a880ba63a3a8603e4babf2c2f7659e5.zip
compilation fixes for clang
-rw-r--r--starts/meaning-vm/level-2/baseref.hpp2
-rw-r--r--starts/meaning-vm/level-2/funcs.cpp4
-rw-r--r--starts/meaning-vm/level-2/funcs.hpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/starts/meaning-vm/level-2/baseref.hpp b/starts/meaning-vm/level-2/baseref.hpp
index 921d1d3..c66d1a7 100644
--- a/starts/meaning-vm/level-2/baseref.hpp
+++ b/starts/meaning-vm/level-2/baseref.hpp
@@ -17,7 +17,7 @@ struct baseref : public level1::baseref<ref>
using level1::template baseref<ref>::baseref;
// thread-local context
- static ref context() { return level2::context(); }
+ static ref & context() { return level2::context(); }
template <typename... Refs>
ref operator()(Refs... args) { return level2::dohabit(self, {args.ptr()...}); }
diff --git a/starts/meaning-vm/level-2/funcs.cpp b/starts/meaning-vm/level-2/funcs.cpp
index 3c34c41..ed50c39 100644
--- a/starts/meaning-vm/level-2/funcs.cpp
+++ b/starts/meaning-vm/level-2/funcs.cpp
@@ -11,7 +11,7 @@ namespace level2 {
using namespace concepts;
-ref context()
+ref & context()
{
static thread_local auto ctx = a(concepts::context);
return ctx;
@@ -19,7 +19,7 @@ ref context()
ref makehabit(ref name, std::initializer_list<ref> argnames, std::function<void(ref)> code)
{
- ref habit = level1::a(habit, name);
+ ref habit = level1::a(concepts::habit, name);
ref posarg = habit;
for (auto argname : argnames) {
ref nextarg = a(positional-argument);
diff --git a/starts/meaning-vm/level-2/funcs.hpp b/starts/meaning-vm/level-2/funcs.hpp
index f32679c..2a92bfd 100644
--- a/starts/meaning-vm/level-2/funcs.hpp
+++ b/starts/meaning-vm/level-2/funcs.hpp
@@ -8,7 +8,7 @@
namespace intellect {
namespace level2 {
-ref context();
+ref & context();
ref makehabit(ref name, std::initializer_list<ref> argnames, std::function<void(ref)> code);
ref dohabit(ref habit, std::initializer_list<ref> args);