Displaying 14 results from an estimated 14 matches for "decref".
Did you mean:
decree
2019 Nov 22
1
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...cleanup. Very unlikely and a lot of code in
> > the standard library have
> > this issue.
> >
> > In sanlock we do:
> >
> > if (PyModule_AddIntConstant(m, "LSFLAG_ADD", SANLK_LSF_ADD))
> > return -1;
> >
> > And the caller decref the module object and return NULL.
> >
> > See
> > https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1846
> > https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1763
>
> Yes I ca...
2019 Nov 22
2
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...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, "LSFLAG_ADD", SANLK_LSF_ADD))
return -1;
And the caller decref the module object and return NULL.
See
https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1846
https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1763
> + PyModule_AddIntConstant (m, "THREAD_MODEL_S...
2019 Aug 12
0
[PATCH libnbd 6/7] python: Use free callback to free closure root.
...r/generator
+++ b/generator/generator
@@ -4315,9 +4315,6 @@ let print_python_binding name { args; optargs; ret; may_set_error } =
) cbargs;
pr " }\n";
pr "\n";
- pr " if (valid_flag & LIBNBD_CALLBACK_FREE)\n";
- pr " Py_DECREF ((PyObject *)user_data);\n";
- pr "\n";
pr " return ret;\n";
pr "}\n";
pr "\n"
@@ -4454,6 +4451,11 @@ let print_python_binding name { args; optargs; ret; may_set_error } =
pr " PyErr_SetString (PyExc_TypeErr...
2019 Aug 11
3
[PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
This adds a C-only semi-private function for freeing various types of
persistent data passed to libnbd.
There are some similarities with nbd_add_close_callback which we
removed in commit 7f191b150b52ed50098976309a6af883d245fc56.
---
generator/generator | 46 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)
diff --git a/generator/generator b/generator/generator
2007 Apr 13
0
[952] branches/wxruby2/wxwidgets_282/doc/textile/gridcellattr.txtl: Doc fix from Wx 2.8
...ss="cx"> h3(#GridCellAttr_incref). GridCellAttr#inc_ref
</span><span class="cx">
</span><span class="cx"> *inc_ref*()
</span><span class="lines">@@ -64,6 +65,7 @@
</span><span class="cx"> calling DecRef() once will delete it. Calling IncRef() allows to lock
</span><span class="cx"> it until the matching DecRef() is called
</span><span class="cx">
</span><ins>+
</ins><span class="cx"> h3(#GridCellAttr_decref). GridCellAt...
2019 Nov 22
0
Re: [PATCH nbdkit v2 02/10] python: Add various constants to the API.
...TIONS);
>
> 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, "LSFLAG_ADD", SANLK_LSF_ADD))
> return -1;
>
> And the caller decref the module object and return NULL.
>
> See
> https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1846
> https://github.com/nirs/sanlock/blob/53f7f0284c084ac2e4542fd1f71d0406075adb5d/python/sanlock.c#L1763
Yes I can make this change. It'...
2019 Aug 12
0
Re: [PATCH libnbd proposal] api: Add semi-private function for freeing persistent data.
...ID|FREE parameter not sufficient? If we
can convince the C bindings for python nbd.aio_pread to increase the
refcount of buf, and then install a C completion handler (whether the
python user called nbd.aio_pread with no python completer, or whether
they called nbd.aio_pread_complete) that does the decref when called
with FREE, then that would do the same job, even without the need for
nbd_add_free_callback, wouldn't it? And there's no issue of scanning
through a list of pointers with a free callback associated with them
(storing registered pointers with some sort of hash may eventually get...
2010 Mar 10
0
[LLVMdev] On-Stack Replacement & Code Patching
...te a new
function each time. We don't want to worry about other threads that
may be executing machine code while we're patching it, so the simple
design is that every snippet of code has an object that owns it. Each
frame executing that code increments the refcount before entering it,
and decrefs after exit. This is basically the call wrapper that
you're talking about.
This doesn't do on-stack replacement, but it may help you solve some
of your problems.
>
> Another potential issue is that if I recompile some function, I would
> ideally want to keep the same stack repre...
2019 Jul 16
1
Re: [PATCH libnbd v2] generator: Define new Closure type instead of callbacks.
...pr "free_%s_user_data (void *vp)\n" name;
> + pr "{\n";
> + pr " struct %s_user_data *user_data = vp;\n" name;
> + pr "\n";
> + List.iter (
> + fun { cbname } ->
> + pr " Py_DECREF (user_data->%s);\n" cbname
Oh, good fix. We were not previously incrementing the ref-count of the
Python Callable, and could have ended up deferencing a garbage-collected
object.
> + ) cls;
> + pr " free (user_data);\n";
> + pr "}\n";...
2010 Mar 10
4
[LLVMdev] On-Stack Replacement & Code Patching
I am interested in writing a JIT that makes use of on-stack replacement. This
essentially means that the JIT must be able to compile new versions of
already compiled functions (eg: more optimized versions) and ensure that the
code for the new functions is executed. I was wondering if LLVM offers any
support for this.
Suppose a function f calls a function g, and f is recompiled while g is
running,
2019 Aug 12
14
[PATCH libnbd 0/7] Add free callbacks and remove valid_flag.
As proposed here:
https://www.redhat.com/archives/libguestfs/2019-August/msg00130.html
I didn't actually read Eric's replies to that yet because I've been
concentrating on writing these patches all day. Anyway here they are
and I'll look at what Eric said about the proposal next.
Rich.
2014 Jan 17
0
Wine release 1.7.11
...2_sqrt_precise implementation.
msvcr110: Add __crtTerminateProcess implementation.
msvcrt: Handle null mbstr parameter in mbstowcs.
msvcp110: Fix streamsize parameter size in spec file.
msvcrt/tests: Fix crash in mbstowcs tests.
msvcp110: Make locale::facet::Incref and Decref virtual.
msvcp110: Add locale::_Init implementation.
msvcp110: Add _New_Locimp implementation.
msvcp110: Fix basic_streambuf structure layout.
msvcp110: Fix _Ctypevec structure layout.
msvcrt: Don't overwrite unmatched string in scanf.
Sebastian Lackner (5):...
2019 Jul 16
2
[PATCH libnbd v2] generator: Define new Closure type
As before, but this one has working Python bindings. OCaml still TBD.
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.