annotate Python/importdl.h @ 87690:66c1c9f32567 default tip

Add use_weakref option to functools.lru_cache The use_weakref option makes lru_cache create weak references to the function arguments when creating the cache key, which prevents them from staying in the memory forever even after all other references to them are gone. This is a proof of concept for http://bugs.python.org/issue19859
author Radomir Dopieralski <devel@sheep.art.pl>
date Tue, 03 Dec 2013 16:02:48 +0100
parents ffc6e6b00949
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11601
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
1 #ifndef Py_IMPORTDL_H
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
2 #define Py_IMPORTDL_H
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
3
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
4 #ifdef __cplusplus
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
5 extern "C" {
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
6 #endif
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
7
2052
d7e91437f0a2 Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff changeset
8
76754
257cbd2fac38 Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py.
Brett Cannon <brett@python.org>
parents: 68716
diff changeset
9 extern const char *_PyImport_DynLoadFiletab[];
2052
d7e91437f0a2 Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff changeset
10
68716
ef2b6305d395 Issue #3080: _PyImport_LoadDynamicModule() uses Unicode for name and path
Victor Stinner <victor.stinner@haypocalc.com>
parents: 61467
diff changeset
11 extern PyObject *_PyImport_LoadDynamicModule(PyObject *name, PyObject *pathname,
61467
f197407bdba2 Recorded merge of revisions 81032 via svnmerge from
Antoine Pitrou <solipsis@pitrou.net>
parents: 26885
diff changeset
12 FILE *);
2052
d7e91437f0a2 Lots of changes, most minor (fatal() instead of abort(), use of
Guido van Rossum <guido@python.org>
parents:
diff changeset
13
5894
e2df95b7be78 Removed some variables that are used to exchange data between import.c and
Guido van Rossum <guido@python.org>
parents: 5511
diff changeset
14 /* Max length of module suffix searched for -- accommodates "module.slb" */
e2df95b7be78 Removed some variables that are used to exchange data between import.c and
Guido van Rossum <guido@python.org>
parents: 5511
diff changeset
15 #define MAXSUFFIXSIZE 12
11601
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
16
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
17 #ifdef MS_WINDOWS
11608
9ec7d978800d For Windows, need to add #include <windows.h>.
Guido van Rossum <guido@python.org>
parents: 11601
diff changeset
18 #include <windows.h>
11601
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
19 typedef FARPROC dl_funcptr;
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
20 #else
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
21 typedef void (*dl_funcptr)(void);
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
22 #endif
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
23
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
24
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
25 #ifdef __cplusplus
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
26 }
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
27 #endif
0bad9d8b945f Some rearrangements for the importdl.c restructuring.
Guido van Rossum <guido@python.org>
parents: 8846
diff changeset
28 #endif /* !Py_IMPORTDL_H */