search for: generate_java_prototype

Displaying 18 results from an estimated 18 matches for "generate_java_prototype".

2015 Feb 10
3
[PATCH 1/3] generator: add a simple HTML escaping function
--- generator/utils.ml | 8 +++++++- generator/utils.mli | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/generator/utils.ml b/generator/utils.ml index b24ba8c..3a62084 100644 --- a/generator/utils.ml +++ b/generator/utils.ml @@ -360,4 +360,10 @@ let args_of_optargs optargs = | OInt64 n -> Int64 n | OString n -> String n | OStringList n ->
2015 Feb 10
0
[PATCH 3/3] java: add @Deprecated annotation for deprecated methods
...1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/generator/java.ml b/generator/java.ml index 8b0d12f..81faff1 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -280,7 +280,11 @@ public class GuestFS { pr " */\n"; ); pr " "; - generate_java_prototype ~public:true ~semicolon:false f.name f.style; + let deprecated = + match f with + | { deprecated_by = None } -> false + | { deprecated_by = Some _ } -> true in + generate_java_prototype ~public:true ~semicolon:false ~deprecated f.name f.style; pr "\n...
2013 Feb 04
1
[PATCH] generator: Add visibility to action struct
...pr " * %s\n" shortdesc; + pr " * %s\n" f.shortdesc; pr " * <p>\n"; pr " * %s\n" doc; pr " * @throws LibGuestFSException\n"; pr " */\n"; ); pr " "; - generate_java_prototype ~public:true ~semicolon:false name style; + generate_java_prototype ~public:true ~semicolon:false f.name f.style; pr "\n"; pr " {\n"; pr " if (g == 0)\n"; pr " throw new LibGuestFSException (\"%s: handle is closed\&qu...
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
...name | RHashtable _ -> pr "Hashtable" | RBufferOut _ -> pr "%s" string diff --git a/generator/generator_java.ml b/generator/generator_java.ml index 68972bc..69d5e24 100644 --- a/generator/generator_java.ml +++ b/generator/generator_java.ml @@ -219,10 +219,10 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) | RBufferOut _ -> pr "String "; | RStringList _ -> pr "String[] "; | RStruct (_, typ) -> - let name = java_name_of_struct typ in + let name = camel_name_of_struct typ in pr "%s " n...
2014 Feb 10
5
[PATCH 0/4] add GUID validation (RHBZ#1008417)
Hi, this patch serie adds a new GUID type in the generator, which would do the same as String, but also validating (just in the C output) the passed GUID string. This allows to reject invalid GUIDs before passing them to low-level tools. Pino Toscano (4): utils: add a function to validate a GUID string generator: add a GUID parameter type generator: generate code for parameter validation
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
...ativePathnameList _ -> pr "[String]" | Bool _ -> pr "Bool" | Int _ -> pr "Int" diff --git a/generator/java.ml b/generator/java.ml index 4c89197..81fbf9b 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -485,7 +485,7 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) pr "String %s" n | BufferIn n -> pr "byte[] %s" n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | RelativePathnameList n -> pr "String[] %s"...
2017 Mar 03
2
[PATCH] generator: Allow actions to be deprecated with no replacement.
...deprecated = match f with - | { deprecated_by = None } -> false - | { deprecated_by = Some _ } -> true in + | { deprecated_by = Not_deprecated } -> false + | { deprecated_by = Replaced_by _ | Deprecated_no_replacement } -> + true in generate_java_prototype ~public:true ~semicolon:false ~deprecated f.name f.style; pr "\n"; pr " {\n"; diff --git a/generator/ruby.ml b/generator/ruby.ml index c938bc9..594036d 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -146,9 +146,12 @@ and generate_ruby_c actions () =...
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
..._ | FilenameList _ -> pr "[String]" | Bool _ -> pr "Bool" | Int _ -> pr "Int" diff --git a/generator/java.ml b/generator/java.ml index 4c89197..93266cb 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -485,7 +485,7 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) pr "String %s" n | BufferIn n -> pr "byte[] %s" n - | StringList n | DeviceList n -> + | StringList n | DeviceList n | FilenameList n -> pr "String[] %s" n...
2012 Jul 14
6
[PATCH 0/6] Allow non-optargs functions to gain optional arguments.
This rather complex set of patches allow non-optargs functions to gain optional arguments, while preserving source and binary backwards compatibility. The problem is that we cannot add an optional argument to an existing function. For example, we might want to add flags to the 'lvresize' API which currently has no optional arguments.
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
2016 Sep 02
6
[PATCH 0/4] generator: Some work to split large C files
By splitting up large C files we can make parallel compiles a bit faster. Rich.
2012 Aug 14
7
[PATCH 0/7] Add tar compress, numericowner, excludes flags.
https://bugzilla.redhat.com/show_bug.cgi?id=847880 https://bugzilla.redhat.com/show_bug.cgi?id=847881 This patch series adds various optional arguments to the tar-in and tar-out commands. Firstly (1/7) an optional "compress" flag is added to select compression. This makes the calls tgz-in/tgz-out/txz-in/txz-out deprecated, and expands the range of compression types available.
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
..._ | Dev_or_Path _ | String _ + | Key _ -> pr "String" | BufferIn _ -> pr "String" diff --git a/generator/java.ml b/generator/java.ml index 75732e8..ad53ba3 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -463,7 +463,7 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) match arg with | Pathname n - | Device n | Dev_or_Path n + | Device n | Mountable n | Dev_or_Path n | String n | OptString n | FileIn n @@ -798,7 +798,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *l...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...+ + pr " /**\n"; + pr " * %s\n" shortdesc; + pr " * <p>\n"; + pr " * %s\n" doc; + pr " * @throws LibGuestFSException\n"; + pr " */\n"; + pr " "; ); generate_java_prototype ~public:true ~semicolon:false name style; pr "\n"; pr " {\n"; pr " if (g == 0)\n"; pr " throw new LibGuestFSException (\"%s: handle is closed\");\n" - name; + name; pr " "; if fs...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
...nt64 _ -> pr "Integer" + | Pointer _ -> pr "Int" ); pr " -> "; ) args; diff --git a/generator/java.ml b/generator/java.ml index eec1ab116..c44e669a0 100644 --- a/generator/java.ml +++ b/generator/java.ml @@ -503,18 +503,12 @@ and generate_java_prototype ?(public=false) ?(privat=false) ?(native=false) needs_comma := true; match arg with - | Pathname n - | Device n | Mountable n | Dev_or_Path n | Mountable_or_Path n - | String n - | OptString n - | FileIn n - | FileOut n - | Key n - | GUID n -&...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.