Issue15237
Created on 2012-07-01 10:02 by skrah, last changed 2022-04-11 14:57 by admin.
| Messages (9) | |||
|---|---|---|---|
| msg164469 - (view) | Author: Stefan Krah (skrah) * ![]() |
Date: 2012-07-01 10:02 | |
Unfortunately, this won't make it into 3.3. -- The self-review of mpdecimal.c had priority and was extremely time consuming. |
|||
| msg164474 - (view) | Author: Mark Dickinson (mark.dickinson) * ![]() |
Date: 2012-07-01 10:42 | |
See issue #7652 for context. |
|||
| msg200154 - (view) | Author: Stefan Krah (skrah) * ![]() |
Date: 2013-10-17 19:01 | |
I've looked at this, and the question is: Do we really need a capsule API? All relevant symbols in _decimal start with Py* and shouldn't need to be static. |
|||
| msg200168 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2013-10-17 20:48 | |
On 17.10.2013 21:01, Stefan Krah wrote: > > Stefan Krah added the comment: > > I've looked at this, and the question is: Do we really need a capsule > API? All relevant symbols in _decimal start with Py* and shouldn't > need to be static. You need a capsule in order to use the C API from other extension modules. See the datetime module for an example. |
|||
| msg200234 - (view) | Author: Stefan Krah (skrah) * ![]() |
Date: 2013-10-18 09:39 | |
I believe you, but I'd like to understand why. :) It seems to me that a module and also PyInit_xxx() can be loaded portably. Say the handles to the module are cached somewhere after loading and initializing. I think this already happens in Python/dynload_shlib.c. Why can't another module use a slightly modified form of _PyImport_GetDynLoadFunc() to get any non-static function apart from PyInit_xxx() by re-using the cached handle? |
|||
| msg200236 - (view) | Author: Marc-Andre Lemburg (lemburg) * ![]() |
Date: 2013-10-18 10:02 | |
On 18.10.2013 11:39, Stefan Krah wrote: > > Stefan Krah added the comment: > > I believe you, but I'd like to understand why. :) :-) > It seems to me that a module and also PyInit_xxx() can be loaded portably. > Say the handles to the module are cached somewhere after loading and > initializing. I think this already happens in Python/dynload_shlib.c. > > Why can't another module use a slightly modified form of _PyImport_GetDynLoadFunc() > to get any non-static function apart from PyInit_xxx() by re-using the cached > handle? This may work on Linux (and probably does if you use the right DL flags), but I don't think this works reliably or at all on other platforms such as Windows. Symbols from shared libs are not necessarily available to all other shared libraries in the same process. CObjects, which Capsules originate from, were added to address this problem in a portable way. It's the Python standard approach to "importing" C APIs from other extension modules. |
|||
| msg200256 - (view) | Author: Stefan Krah (skrah) * ![]() |
Date: 2013-10-18 14:00 | |
Marc-Andre Lemburg <report@bugs.python.org> wrote: > This may work on Linux (and probably does if you use the right > DL flags), but I don't think this works reliably or at all on other > platforms such as Windows. Symbols from shared libs are not necessarily > available to all other shared libraries in the same process. Thanks. On Linux the scheme works (I stored the DLL handle in the PyModuleObject and added a function PyModule_GetSymbol()). |
|||
| msg226294 - (view) | Author: Stefan Behnel (scoder) * ![]() |
Date: 2014-09-03 06:43 | |
Is this superseded by issue 22194 now or the other way round? |
|||
| msg226300 - (view) | Author: Larry Hastings (larry) * ![]() |
Date: 2014-09-03 07:32 | |
I think #22194 is a duplicate issue. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:32 | admin | set | github: 59442 |
| 2019-02-27 16:45:57 | p-ganssle | set | nosy:
+ p-ganssle |
| 2014-09-03 07:32:51 | larry | set | messages: + msg226300 |
| 2014-09-03 06:43:04 | scoder | set | nosy:
+ scoder messages:
+ msg226294 |
| 2013-10-18 14:00:11 | skrah | set | messages: + msg200256 |
| 2013-10-18 10:02:10 | lemburg | set | messages: + msg200236 |
| 2013-10-18 09:39:56 | skrah | set | messages: + msg200234 |
| 2013-10-17 20:48:56 | lemburg | set | messages: + msg200168 |
| 2013-10-17 19:01:55 | skrah | set | messages: + msg200154 |
| 2012-07-01 14:41:16 | Arfrever | set | nosy:
+ Arfrever |
| 2012-07-01 10:42:26 | mark.dickinson | set | messages: + msg164474 |
| 2012-07-01 10:09:42 | larry | set | nosy:
+ larry |
| 2012-07-01 10:02:50 | skrah | create | |
