From a873524f8c7a1e5cbce29c2def0288fbce59a43c Mon Sep 17 00:00:00 2001 From: Edouard Tisserant Date: Thu, 19 May 2016 18:20:39 +0200 Subject: [PATCH] Fixing generation --- src/gen_java_Engine.ysl2 | 2 ++ src/pEp.yml2 | 19 +++++++++---------- src/types_java.ysl2 | 4 +++- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/gen_java_Engine.ysl2 b/src/gen_java_Engine.ysl2 index b9688f8..e3bf865 100644 --- a/src/gen_java_Engine.ysl2 +++ b/src/gen_java_Engine.ysl2 @@ -40,6 +40,8 @@ tstylesheet { choose { when "$ptype = 'string'" |> «$pitype» _«$pname» = «$pname».getBytes(); + when "$ptype = 'bool'" + |> «$pitype» _«$pname» = «$pname».booleanValue(); otherwise |> «$pitype» _«$pname» = new «$pitype»(«$pname»); } diff --git a/src/pEp.yml2 b/src/pEp.yml2 index c5d07d1..aabdf32 100644 --- a/src/pEp.yml2 +++ b/src/pEp.yml2 @@ -100,23 +100,22 @@ namespace pEp { returns Color color ); - -// method blacklist_retrive( -// creates stringlist blacklist -// ); + // method blacklist_retrive( + // creates stringlist blacklist + // ); - basic string trustwords(identity ident); + basic string trustwords(identity ident); basic identity myself(identity ident); basic identity updateIdentity(identity ident); basic void keyCompromized(identity ident); basic void keyResetTrust(identity ident); basic void trustPersonalKey(identity ident); basic void importKey(string key); - basic void blacklist_add(string fpr); - basic void blacklist_delete(string fpr); - basic void config_passive_mode(bool enable); - basic bool blacklist_is_listed(string fpr); - + basic void blacklist_add(string fpr); + basic void blacklist_delete(string fpr); + basic void config_passive_mode(bool enable); + basic bool blacklist_is_listed(string fpr); + }; struct message { diff --git a/src/types_java.ysl2 b/src/types_java.ysl2 index 4477bc0..a1ee923 100644 --- a/src/types_java.ysl2 +++ b/src/types_java.ysl2 @@ -34,7 +34,7 @@ function "toJavaDeclare" { when "$type='stringpairlist'" | # cannot declare "stringpairlist" when "$type='message'" > Message when "$type='Color'" > Color - when "$type='bool'" > Boolean + //when "$type='bool'" > boolean otherwise error | # cannot declare "«$type»" } @@ -45,6 +45,7 @@ function "toSig" { choose { when "$type='string'" error | # cannot declare "string" + when "$type='bool'" > Z otherwise { > L choose { @@ -75,6 +76,7 @@ function "toIntermediate" { when "$type='identity'" > _Identity when "$type='identitylist'" > Vector<_Identity> when "$type='bloblist'" > Vector<_Blob> + when "$type='bool'" > boolean otherwise call "toJava" with "type", "$type"; }