summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-09-02 11:11:55 +0100
committerRichard Jones <rjones@redhat.com>2010-09-02 11:11:55 +0100
commitb8b0c99b46172712aa190f70182734934587af7b (patch)
treea12118640f05b6a395a10e6fec19948820d92122 /src
parent0f24424f357e854a9da382de11e4fe81305c8743 (diff)
downloadlibguestfs-b8b0c99b46172712aa190f70182734934587af7b.tar.gz
libguestfs-b8b0c99b46172712aa190f70182734934587af7b.tar.xz
libguestfs-b8b0c99b46172712aa190f70182734934587af7b.zip
perl: Document handle is a hashref.
For details see commit eb566f7dc7974b42ac65729a2e5e5bcee329a0a9.
Diffstat (limited to 'src')
-rwxr-xr-xsrc/generator.ml18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml
index fcac9f83..97dc6ac4 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -9981,6 +9981,24 @@ L<Sys::Guestfs::Lib(3)/feature_available>.
For further discussion on this topic, refer to
L<guestfs(3)/AVAILABILITY>.
+=head1 STORING DATA IN THE HANDLE
+
+The handle returned from L</new> is a hash reference. The hash
+normally contains a single element:
+
+ {
+ _g => [private data used by libguestfs]
+ }
+
+Callers can add other elements to this hash to store data for their own
+purposes. The data lasts for the lifetime of the handle.
+
+Any fields whose names begin with an underscore are reserved
+for private use by libguestfs. We may add more in future.
+
+It is recommended that callers prefix the name of their field(s)
+with some unique string, to avoid conflicts with other users.
+
=head1 COPYRIGHT
Copyright (C) %s Red Hat Inc.