Skip to content
Snippets Groups Projects
Commit bb2b7bc1 authored by Anthony Mallet's avatar Anthony Mallet
Browse files

[wip/genom3] Update to 2.99.23

Changes since 2.99.22:
 . Added a new genom-IDL type "optional< type >"
 . Fixed compatibility issues with tcl-8.6
 . Fixed the definition of the error code in genom_syserr
 . Dropped error code from genom_mwerr exception
 . Fixed a bunch of minor bugs in the parser / code generator.
parent 45d1477b
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,7 @@
# Created: Anthony Mallet on Fri, 19 Oct 2012
#
PKGREVISION= 1
VERSION= 2.99.22
VERSION= 2.99.23
DISTNAME= genom-${VERSION}
PKGNAME= genom3-${VERSION}
CATEGORIES= architecture
......
......@@ -19,7 +19,7 @@ SYSTEM_SEARCH.genom3=\
include/genom3/c/client.h \
'lib/pkgconfig/genom3.pc:/Version/s/[^0-9.]//gp'
DEPEND_ABI.genom3?= genom3>=2.99.22
DEPEND_ABI.genom3?= genom3>=2.99.23
DEPEND_DIR.genom3?= ../../wip/genom3
export GENOM3= ${PREFIX.genom3}/bin/genom3
......
SHA1 (genom-2.99.22.tar.gz) = 6cdae22a3f7b4fd84d21e6a5c44654cd7c6ba34d
RMD160 (genom-2.99.22.tar.gz) = 2a439662c5c5d5fa4e9c15842de58e5958fbeb81
Size (genom-2.99.22.tar.gz) = 1346320 bytes
SHA1 (patch-aa) = a4d9b791b516e2c0f5b9599f6c11d77020042fdc
SHA1 (genom-2.99.23.tar.gz) = 70336dcf55356179f1ee54ef8c399a97b5e4aa27
RMD160 (genom-2.99.23.tar.gz) = 7b0c7b1592df4125f0f43b1e1c7e9e9c618d00b9
Size (genom-2.99.23.tar.gz) = 1350607 bytes
upstream commit 297ddbc6d61d9b7a98bb704cc0564176523a183a
Fix some objects iterators in the generator so that they stop randomizing lists
Fix the 'throws' method of components/remotes/services/tasks so that the
returned list is kept in a deterministic order. This is important for several
reasons, the most important one being that the client and server md5 digests
rely on it.
The problem was that in order to remove duplicates in the list, the tcl "lsort
-unique" procedure was used. While this actually removes duplicates, this
paradoxically introduces a randomization of the list, because the string
representation of genom objects in Tcl is based on their address in memory.
So just use a trivial duplicates removal that preserves order instead.
diff --git engine/tcl/component.c engine/tcl/component.c
index d62a063..20e0976 100644
--- engine/tcl/component.c
+++ engine/tcl/component.c
@@ -130,8 +130,8 @@ comp_cmd(ClientData v, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
case compidx_throws: {
Tcl_Obj *argv[] = {
- Tcl_NewStringObj("lsort", -1),
- Tcl_NewStringObj("-unique", -1),
+ Tcl_NewStringObj("object", -1),
+ Tcl_NewStringObj("unique", -1),
NULL,
};
prop_s p;
diff --git engine/tcl/object.tcl engine/tcl/object.tcl
index 8b76321..425c48a 100644
--- engine/tcl/object.tcl
+++ engine/tcl/object.tcl
@@ -271,5 +271,20 @@ namespace eval object {
}
+ # --- unique -------------------------------------------------------------
+
+ # Remove duplicates in a list while preserving order: only the first item is
+ # kept.
+ #
+ proc unique { list } {
+ set r [list]
+ foreach e $list {
+ if {[lsearch -exact $r $e] < 0} { lappend r $e }
+ }
+ return $r
+ }
+ namespace export unique
+
+
namespace ensemble create
}
diff --git engine/tcl/remote.c engine/tcl/remote.c
index 3c6486f..4397c79 100644
--- engine/tcl/remote.c
+++ engine/tcl/remote.c
@@ -132,8 +132,8 @@ remote_cmd(ClientData v, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
case remoteidx_throws: {
Tcl_Obj *argv[] = {
- Tcl_NewStringObj("lsort", -1),
- Tcl_NewStringObj("-unique", -1),
+ Tcl_NewStringObj("object", -1),
+ Tcl_NewStringObj("unique", -1),
NULL,
};
hiter i;
diff --git engine/tcl/service.c engine/tcl/service.c
index 0757463..ceb3f93 100644
--- engine/tcl/service.c
+++ engine/tcl/service.c
@@ -140,8 +140,8 @@ service_cmd(ClientData v, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
case serviceidx_throws: {
Tcl_Obj *argv[] = {
- Tcl_NewStringObj("lsort", -1),
- Tcl_NewStringObj("-unique", -1),
+ Tcl_NewStringObj("object", -1),
+ Tcl_NewStringObj("unique", -1),
NULL,
};
hiter i;
diff --git engine/tcl/task.c engine/tcl/task.c
index 82ab066..a044e2c 100644
--- engine/tcl/task.c
+++ engine/tcl/task.c
@@ -101,8 +101,8 @@ task_cmd(ClientData v, Tcl_Interp *interp, int objc, Tcl_Obj *const objv[])
case taskidx_throws: {
Tcl_Obj *argv[] = {
- Tcl_NewStringObj("lsort", -1),
- Tcl_NewStringObj("-unique", -1),
+ Tcl_NewStringObj("object", -1),
+ Tcl_NewStringObj("unique", -1),
NULL,
};
prop_s p;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment