From 9cfc133481ba1b9b493d33c979058f3b359424c6 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 7 Jan 2016 15:43:35 -0500 Subject: [PATCH] "Fixed" the weird crashes and fixed the makefile failures. --- build/GNUbasegcc.mk | 2 +- darwin/map.m | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/GNUbasegcc.mk b/build/GNUbasegcc.mk index 552394e0..6dca4e5b 100644 --- a/build/GNUbasegcc.mk +++ b/build/GNUbasegcc.mk @@ -53,7 +53,7 @@ endif $(OUT): $(OFILES) | $(OUTDIR) @$(reallinker) -o $(OUT) $(OFILES) $(LDFLAGS) ifeq ($(USESSONAME),1) - @ln -s $(NAME)$(SUFFIX) $(OUTNOSONAME) + @ln -sf $(NAME)$(SUFFIX) $(OUTNOSONAME) endif @echo ====== Linked $(OUT) diff --git a/darwin/map.m b/darwin/map.m index 968a86f9..a66d0cd2 100644 --- a/darwin/map.m +++ b/darwin/map.m @@ -1,8 +1,6 @@ // 17 august 2015 #import "uipriv_darwin.h" -// TODO are the NSValues (or worse, the NSMapTable) being garbage collected underfoot? crash the package ui test when closing the main window; etc. - // unfortunately NSMutableDictionary copies its keys, meaning we can't use it for pointers // hence, this file // we could expose a NSMapTable directly, but let's treat all pointers as opaque and hide the implementation, just to be safe and prevent even more rewrites later @@ -17,6 +15,8 @@ struct mapTable *newMap(void) m = uiNew(struct mapTable); m->m = [NSMapTable mapTableWithKeyOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality) valueOptions:(NSPointerFunctionsOpaqueMemory | NSPointerFunctionsOpaquePersonality)]; + // TODO why do I need this + [m->m retain]; return m; }