git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename global 'xdr_str'.
[libguestfs.git]
/
src
/
generator.ml
diff --git
a/src/generator.ml
b/src/generator.ml
index
9617013
..
dac2fd1
100755
(executable)
--- a/
src/generator.ml
+++ b/
src/generator.ml
@@
-5236,7
+5236,7
@@
let rec generate_actions_pod () =
The string is owned by the guest handle and must I<not> be freed.\n\n"
| RConstOptString _ ->
pr "This function returns a string which may be NULL.
The string is owned by the guest handle and must I<not> be freed.\n\n"
| RConstOptString _ ->
pr "This function returns a string which may be NULL.
-There is way to return an error from this function.
+There is
no
way to return an error from this function.
The string is owned by the guest handle and must I<not> be freed.\n\n"
| RString _ ->
pr "This function returns a string, or NULL on error.
The string is owned by the guest handle and must I<not> be freed.\n\n"
| RString _ ->
pr "This function returns a string, or NULL on error.
@@
-5341,7
+5341,7
@@
and generate_xdr () =
generate_header CStyle LGPLv2plus;
(* This has to be defined to get around a limitation in Sun's rpcgen. *)
generate_header CStyle LGPLv2plus;
(* This has to be defined to get around a limitation in Sun's rpcgen. *)
- pr "typedef string str<>;\n";
+ pr "typedef string
guestfs_
str<>;\n";
pr "\n";
(* Internal structures. *)
pr "\n";
(* Internal structures. *)
@@
-5376,8
+5376,8
@@
and generate_xdr () =
function
| Pathname n | Device n | Dev_or_Path n | String n ->
pr " string %s<>;\n" n
function
| Pathname n | Device n | Dev_or_Path n | String n ->
pr " string %s<>;\n" n
- | OptString n -> pr " str *%s;\n" n
- | StringList n | DeviceList n -> pr " str %s<>;\n" n
+ | OptString n -> pr "
guestfs_
str *%s;\n" n
+ | StringList n | DeviceList n -> pr "
guestfs_
str %s<>;\n" n
| Bool n -> pr " bool %s;\n" n
| Int n -> pr " int %s;\n" n
| Int64 n -> pr " hyper %s;\n" n
| Bool n -> pr " bool %s;\n" n
| Int n -> pr " int %s;\n" n
| Int64 n -> pr " hyper %s;\n" n
@@
-5407,7
+5407,7
@@
and generate_xdr () =
pr "};\n\n"
| RStringList n ->
pr "struct %s_ret {\n" name;
pr "};\n\n"
| RStringList n ->
pr "struct %s_ret {\n" name;
- pr " str %s<>;\n" n;
+ pr "
guestfs_
str %s<>;\n" n;
pr "};\n\n"
| RStruct (n, typ) ->
pr "struct %s_ret {\n" name;
pr "};\n\n"
| RStruct (n, typ) ->
pr "struct %s_ret {\n" name;
@@
-5419,7
+5419,7
@@
and generate_xdr () =
pr "};\n\n"
| RHashtable n ->
pr "struct %s_ret {\n" name;
pr "};\n\n"
| RHashtable n ->
pr "struct %s_ret {\n" name;
- pr " str %s<>;\n" n;
+ pr "
guestfs_
str %s<>;\n" n;
pr "};\n\n"
| RBufferOut n ->
pr "struct %s_ret {\n" name;
pr "};\n\n"
| RBufferOut n ->
pr "struct %s_ret {\n" name;
@@
-8784,6
+8784,12
@@
and generate_python_c () =
pr "\
#include <Python.h>
pr "\
#include <Python.h>
+#if PY_VERSION_HEX < 0x02050000
+typedef int Py_ssize_t;
+#define PY_SSIZE_T_MAX INT_MAX
+#define PY_SSIZE_T_MIN INT_MIN
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>