From 941741c6f7ec4924962c2267b1756ff926559cc4 Mon Sep 17 00:00:00 2001 From: Timo Korvola Date: Mon, 30 Jan 2017 11:13:48 +0200 Subject: [PATCH] All variable setters now use GIL. Most setters are now defined by a CPP macro. It is not pretty and may well be the ugliest way to do this except for the one it replaces. Change-Id: I27d36bfef6252f78ee801ebbc022d6fe75a3b49c --- .../jnipython.dll | Bin 62976 -> 63488 bytes .../src/sclpy.c | 141 ++++++------------ 2 files changed, 45 insertions(+), 96 deletions(-) diff --git a/org.simantics.pythonlink.win32.x86_64/jnipython.dll b/org.simantics.pythonlink.win32.x86_64/jnipython.dll index 37e45770533af445a425847d0cc431e9065461ac..a605b4e9da45bd49bbe4119bef0885bb37f6b1c7 100644 GIT binary patch delta 8776 zcmeHMeSA#Ux?X!^A|KL37)cOGn2;!uh>rwewE5U%NJL7I5`w0xF1HD}sEJ09ju4ho zJ-(~0s-T(HE%gzNiuO2%(yHq1t=7>_M2}GSQvKNHdDmVuNOJzW|J>j2%*;rHH;#jyG5UAOTH{l~{#4j+ zzMOY!yok?h^cDU;H%<|JU&j3=IP2N`0@7silbOQU^yQxHd&8O>m#>j^4G;7+_%OB= zu3X*iRmM9i$2_liD6GO82 zy3oRyCFa@bQwyguHaL*H3S;d--}8NF^S_RZhMvmWSg&;+zMebAGgiNuxAh3Nl|F&u zAIPpgq#fYSlYn9IfS1z%*HQtoL4Z!Z02hY?B1QpL`2y-90WT#2wu}bcGXdJQ0>tjMFYYp(l)YPYD8G*`JUggo<_7!z~2T9jwAnp23+X9S~lZ8V6 zlmQrE0F1%Z)$bh!NTU>==m*#`0N@-8cs(01v_GIc9k6R4ppPfuKIPt@M!{$R4c!2q znSiB~`{o!*bYlo$C#5&ak!PG>P(I{`TlZHgcw_6{wjQ?`Q|*4mUofVbCfL0T-GsS)qIS`YB%12rP|NQ z+5B(b;I~f&iDAgrhLFt0{R>Ny@3x8Y_AmZwE zmnXjt%^E%_FpO_#JI8RZo_hu+DqFZE(4_3=;{sPJ!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