|
1 A brief summary of changes made to Python 2.5.4 source to get it working on |
|
2 Symbian: |
|
3 |
|
4 - Changed the definition of the PyAPI_DATA and all the python header files |
|
5 which used the earlier PyAPI_DATA to use its new form as DLL data export is |
|
6 not supported on Symbian. A workaround is to have functions that return |
|
7 pointers to the data and macros that hide the calls made to these functions. |
|
8 This is enabled when the macro EXPORT_DATA_AS_FUNCTIONS is defined. |
|
9 |
|
10 - To handle recursions causing stack overflows gracefully stack checks are done |
|
11 more frequently. |
|
12 |
|
13 - Disabled creation of byte compiled files when python modules are loaded |
|
14 |
|
15 - On the Symbian platform a value greater than 1e49 limits the precision to 28 |
|
16 above which it crashes the interpreter with panic User24. Added a check so |
|
17 that OverflowError is raised for values greater than 1e49 with precision |
|
18 greater than 28. |
|
19 |
|
20 - Modified python's core memory APIs so that it defines macros which can |
|
21 be used to set custom malloc/realloc/free functions. |
|
22 |
|
23 - Python regression suite tests for modules that were not supported on Symbian, |
|
24 were disabled by adding a platform check in the test itself. Limits were |
|
25 reduced in tests which assumed a huge stack was available and were failing |
|
26 with stack overflow error. |
|
27 |
|
28 - Implementation of the Python TLS API on top of the POSIX threads TLS API. |
|
29 Also added PyThread_AtExit which provides extension modules to register their |
|
30 functions which cleanup resources at thread exit. |
|
31 |
|
32 - A new exception SymbianError is added which is used to set Symbian errors. |
|
33 |
|
34 - dynload_shlib is modified to load the function at ordinal 1 which corresponds |
|
35 to the init function (Symbian uses ordinal numbers to identify functions). |
|
36 |
|
37 - The default file system encoding is set to 'utf-8' |
|
38 |
|
39 - socketmodule is patched to workaround the OpenC bug related to getaddrinfo. |
|
40 |
|
41 - A separate copy of site.py and pyconfig.h is maintained in Symbian directory |
|
42 as the changes done to these files is applicable only to Symbian platform |
|
43 |
|
44 - The classification of core python modules into builtin and PYDs is specified |
|
45 in the modules.cfg file in Symbian\src. This file is parsed by |
|
46 module_config_parser.py which generates and modifies the individual extension |
|
47 and python dll build files. Minor changes were done to some modules' init |
|
48 function and headers to facilitate building them as PYDs. |
|
49 |
|
50 - To support co-existence of 1.4.x and 1.9.x Python runtimes, the binaries of |
|
51 the latter version are prefixed with 'kf_' and the import hook in site.py is |
|
52 modified to look for the renamed binary. |
|
53 |
|
54 - Python core files modsupport.c and getargs.c are patched to support va_list's |
|
55 structure definition which is defined in gcce.h |
|
56 |
|
57 - Added access_points() and set_default_access_point() to the socket module |
|
58 for accessing the list of available access points and to set the default |
|
59 access point. |
|
60 |
|
61 - linesep changed to '\n' from '\r\n' in os.py. |
|
62 |
|
63 - Maintaining linked lists to track all memory allocations and open DLLs. These |
|
64 are later used during application exit to cleanup all the resources. |