(* libguestfs
- * Copyright (C) 2009-2010 Red Hat Inc.
+ * Copyright (C) 2009-2011 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
pr " * %s\n" doc;
pr " * @throws LibGuestFSException\n";
pr " */\n";
- pr " ";
);
+ pr " ";
generate_java_prototype ~public:true ~semicolon:false name style;
pr "\n";
pr " {\n";
pr "boolean %s" n
| Int n ->
pr "int %s" n
- | Int64 n ->
+ | Int64 n | Pointer (_, n) ->
pr "long %s" n
) args;
pr ", jboolean j%s" n
| Int n ->
pr ", jint j%s" n
- | Int64 n ->
+ | Int64 n | Pointer (_, n) ->
pr ", jlong j%s" n
) args;
if optargs <> [] then
pr " int %s;\n" n
| Int64 n ->
pr " int64_t %s;\n" n
+ | Pointer (t, n) ->
+ pr " %s %s;\n" t n
) args;
let needs_i =
| Int n
| Int64 n ->
pr " %s = j%s;\n" n n
+ | Pointer (t, n) ->
+ pr " %s = (%s) j%s;\n" n t n
) args;
if optargs <> [] then (
pr " (*env)->ReleaseStringUTFChars (env, o, %s[i]);\n" n;
pr " }\n";
pr " free (%s);\n" n
- | Bool n
- | Int n
- | Int64 n -> ()
+ | Bool _
+ | Int _
+ | Int64 _
+ | Pointer _ -> ()
) args;
(* Check for errors. *)