Skip to content

Instantly share code, notes, and snippets.

@paulsmith
Created February 8, 2015 04:32
Show Gist options
  • Save paulsmith/eab114a9f742f1d183c4 to your computer and use it in GitHub Desktop.
Save paulsmith/eab114a9f742f1d183c4 to your computer and use it in GitHub Desktop.
patch https://bitbucket.org/tkatchev/tab to compile on OS X
diff --git a/funcs.h b/funcs.h
index 5780af7..d99a5da 100644
--- a/funcs.h
+++ b/funcs.h
@@ -18,7 +18,7 @@ namespace funcs {
#include "funcs/if.h"
#include "funcs/array.h"
#include "funcs/sort.h"
-#include "funcs/reverse.h"
+//#include "funcs/reverse.h"
#include "funcs/misc.h"
#include "funcs/hist.h"
@@ -45,7 +45,7 @@ void register_functions() {
funcs::register_if(funs);
funcs::register_array(funs);
funcs::register_sort(funs);
- funcs::register_reverse(funs);
+ //funcs::register_reverse(funs);
funcs::register_misc(funs);
funcs::register_hist(funs);
}
diff --git a/funcs/index.h b/funcs/index.h
index bd96a62..0321f01 100644
--- a/funcs/index.h
+++ b/funcs/index.h
@@ -225,7 +225,7 @@ Functions::func_t index_checker(const Type& args, Type& ret, obj::Object*& obj)
if (!arg.literal || !check_integer(arg))
throw std::runtime_error("Indexing tuples is only possible with integer literals.");
- size_t i;
+ size_t i = 0;
Functions::func_t fun;
if (arg.atom == Type::UINT) {
diff --git a/infer.h b/infer.h
index 17ff22f..cd8530c 100644
--- a/infer.h
+++ b/infer.h
@@ -364,7 +364,6 @@ Type infer_map_generator(const std::vector<Type>& stack) {
Type infer_expr(std::vector<Command>& commands, TypeRuntime& typer, bool allow_empty = false) {
std::vector<Type> stack;
- auto& vars = typer.vars;
for (auto ci = commands.begin(); ci != commands.end(); ++ci) {
Command& c = *ci;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment