From d0090e9551ea282fa6af61073d621139b04b2be0 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 25 Mar 2012 21:12:20 +0400 Subject: [PATCH] Fix lua wrapper: create one function identity instance per method. Otherwise all methods of the same prototype are lumped into one. --- library/include/DataFuncs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/include/DataFuncs.h b/library/include/DataFuncs.h index 1dc651489..a3769af55 100644 --- a/library/include/DataFuncs.h +++ b/library/include/DataFuncs.h @@ -123,7 +123,7 @@ INSTANTIATE_WRAPPERS(4, (A1,A2,A3,A4), (vA1,vA2,vA3,vA4), template inline function_identity_base *wrap_function(T ptr) { - static function_identity identity(ptr); - return &identity; + // bah, but didn't have any idea how to allocate statically + return new function_identity(ptr); } } \ No newline at end of file