summaryrefslogtreecommitdiffstats
path: root/generator/python.ml
Commit message (Collapse)AuthorAgeFilesLines
* generator: Use an OCaml struct to store the structs.Richard W.M. Jones2012-10-301-1/+1
| | | | | | This just makes it simpler to add extra fields to each struct. This is code motion.
* generator: Add 'blocking' flag to marking blocking (long-running) functions.Richard W.M. Jones2012-10-151-12/+19
| | | | | | | | | | | | | In languages like Python where we release a global lock around long-running libguestfs functions, it is also useful to *not* release this lock for small, non-blocking functions. Therefore mark all functions with a 'blocking' boolean flag. It defaults to true, and is true by definition for all daemon functions. For non-daemon functions, I have classified them manually. Only when the blocking flag is set do we generate the code to release and reacquire the lock around libguestfs calls.
* New APIs: guestfs_create_flags, guestfs_parse_environment,Richard W.M. Jones2012-10-151-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guestfs_parse_environment_list. Add a new function for creating a handle: guestfs_h *guestfs_create_flags (unsigned flags [, ...]); This variant lets you supply flags and extra arguments, although extra arguments are not used at the moment. Of particular interest is the ability to separate the creation of the handle from the parsing of environment variables like LIBGUESTFS_DEBUG. guestfs_create does both together, which prevents us from propagating errors from parsing environment variables back to the caller (guestfs_create has always printed any errors on stderr and then just ignored them). If you are interested in these errors, you can now write: g = guestfs_create_flags (GUESTFS_CREATE_NO_ENVIRONMENT); if (!g) exit (EXIT_FAILURE); r = guestfs_parse_environment (g); if (!r) exit (EXIT_FAILURE); Also you can *omit* the call to guestfs_parse_environment, which creates a handle unaffected by the environment (which was not possible before). This commit also includes new (backwards compatible) changes to the OCaml, Perl, Python, Ruby and Java constructors that let you use the flags.
* python: PyInt_* no longer exists in python3, replace with PyLong_*Hilko Bengen2012-09-201-1/+1
|
* generator: Rename 'generator_*' as '*'.Richard W.M. Jones2012-09-021-0/+769
This is a simple renaming of the files/modules. Note that in OCaml, module names are derived from filenames by capitalizing the first letter. Thus the old module names had the form "Generator_api_versions". The new modules names have the form "Api_versions".