Mercurial > cpython-lru_cache-weakref
annotate Include/pygetopt.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 | 0e8bd4785ea0 |
| children |
| rev | line source |
|---|---|
|
15374
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
1 |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
2 #ifndef Py_PYGETOPT_H |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
3 #define Py_PYGETOPT_H |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
4 #ifdef __cplusplus |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
5 extern "C" { |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
6 #endif |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
7 |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
46318
diff
changeset
|
8 #ifndef Py_LIMITED_API |
|
24752
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
15374
diff
changeset
|
9 PyAPI_DATA(int) _PyOS_opterr; |
|
c1eb668525e1
Excise DL_EXPORT from Include.
Mark Hammond <mhammond@skippinet.com.au>
parents:
15374
diff
changeset
|
10 PyAPI_DATA(int) _PyOS_optind; |
|
46318
22a74eaf6b22
Change command line processing API to use wchar_t.
Martin v. Löwis <martin@v.loewis.de>
parents:
24752
diff
changeset
|
11 PyAPI_DATA(wchar_t *) _PyOS_optarg; |
|
75142
0e8bd4785ea0
Fix test failure in test_cmd_line by initializing the hash secret at the earliest point.
Antoine Pitrou <solipsis@pitrou.net>
parents:
66664
diff
changeset
|
12 |
|
0e8bd4785ea0
Fix test failure in test_cmd_line by initializing the hash secret at the earliest point.
Antoine Pitrou <solipsis@pitrou.net>
parents:
66664
diff
changeset
|
13 PyAPI_FUNC(void) _PyOS_ResetGetOpt(void); |
|
66664
62b61abd02b8
Merge branches/pep-0384.
Martin v. Löwis <martin@v.loewis.de>
parents:
46318
diff
changeset
|
14 #endif |
|
15374
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
15 |
|
46318
22a74eaf6b22
Change command line processing API to use wchar_t.
Martin v. Löwis <martin@v.loewis.de>
parents:
24752
diff
changeset
|
16 PyAPI_FUNC(int) _PyOS_GetOpt(int argc, wchar_t **argv, wchar_t *optstring); |
|
15374
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
17 |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
18 #ifdef __cplusplus |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
19 } |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
20 #endif |
|
a826a46bae54
Move our own getopt() implementation to _PyOS_GetOpt(), and use it
Thomas Wouters <thomas@python.org>
parents:
diff
changeset
|
21 #endif /* !Py_PYGETOPT_H */ |
