search for: pymodule_addintconstant

Displaying 8 results from an estimated 8 matches for "pymodule_addintconstant".

2019 Nov 22
2
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...ugins/python/python.c > +++ b/plugins/python/python.c > @@ -231,6 +231,33 @@ create_nbdkit_module (void) > nbdkit_error ("could not create the nbdkit API module"); > exit (EXIT_FAILURE); > } > + > + /* Constants corresponding to various flags. */ > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_CONNECTIONS", > + NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS); This can fail and needs cleanup. Very unlikely and a lot of code in the standard library have this issue. In sanlock we do: if (PyModule_AddIntConstant(m, "LS...
2019 Nov 22
1
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...; @@ -231,6 +231,33 @@ create_nbdkit_module (void) > > > nbdkit_error ("could not create the nbdkit API module"); > > > exit (EXIT_FAILURE); > > > } > > > + > > > + /* Constants corresponding to various flags. */ > > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_CONNECTIONS", > > > + NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS); > > > > This can fail and needs cleanup. Very unlikely and a lot of code in > > the standard library have > > this issue. > > >...
2019 Nov 22
0
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...ugins/python/python.c > > @@ -231,6 +231,33 @@ create_nbdkit_module (void) > > nbdkit_error ("could not create the nbdkit API module"); > > exit (EXIT_FAILURE); > > } > > + > > + /* Constants corresponding to various flags. */ > > + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_CONNECTIONS", > > + NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS); > > This can fail and needs cleanup. Very unlikely and a lot of code in > the standard library have > this issue. > > In sanlock we do: > &gt...
2019 Nov 22
0
[PATCH nbdkit v2 02/10] python: Add various constants to the API.
...c index d65ac45..69cf4e9 100644 --- a/plugins/python/python.c +++ b/plugins/python/python.c @@ -231,6 +231,33 @@ create_nbdkit_module (void) nbdkit_error ("could not create the nbdkit API module"); exit (EXIT_FAILURE); } + + /* Constants corresponding to various flags. */ + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_CONNECTIONS", + NBDKIT_THREAD_MODEL_SERIALIZE_CONNECTIONS); + PyModule_AddIntConstant (m, "THREAD_MODEL_SERIALIZE_ALL_REQUESTS", + NBDKIT_THREAD_MODEL_SERIALIZE_ALL_REQUESTS); + PyModule_AddIntCons...
2019 Nov 21
10
[PATCH nbdkit 0/8] Implement nbdkit API v2 for Python plugins.
And fill out most of the missing bits of the API. Rich.
2019 Nov 22
18
[PATCH nbdkit v2 00/10] Implement nbdkit API v2 for Python plugins.
v1: https://www.redhat.com/archives/libguestfs/2019-November/msg00153.html v2: - Fix implementation of can_cache. - Add implementation of can_fua. - Add a very thorough test suite which tests every command + flag combination.
2019 Nov 23
8
[PATCH nbdkit v3 0/7] Implement nbdkit API v2 for Python plugins.
v2 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00163.html I pushed patch 1 (with spelling fix), patch 4 and patch 5 since those were previously ACKed on the list. Differences in v3: - Add error checking to PyModule_AddIntConstant. - Use API_VERSION constant instead of function. - Add max API version supported to --dump-plugin output. - Print API_VERSION selected by the module in debug output. - Allow .cache to be used from v1 API. Since it's a newly added function we just use the same API as v2. Differences in t...
2019 Nov 25
7
[PATCH nbdkit v2 0/7] Implement nbdkit API v2 for Python plugins.
v3 was here: https://www.redhat.com/archives/libguestfs/2019-November/msg00209.html In v4: - Rebase on top of current master. Includes various fixes and updates required because of Nir's patches that went into master. - Fix api_version() -> API_VERSION in patch 2 noted previously on the mailing list. Rich.