Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Delta Between Two Patch Sets: Python/dynload_aix.c

Issue 14040: Deprecate some of the module file formats
Left Patch Set: Created 7 years, 11 months ago
Right Patch Set: Created 7 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Python/dynload_dl.c » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 1
2 /* Support for dynamic loading of extension modules */ 2 /* Support for dynamic loading of extension modules */
3 3
4 #include "Python.h" 4 #include "Python.h"
5 #include "importdl.h" 5 #include "importdl.h"
6 6
7 #include <ctype.h> /* for isdigit() */ 7 #include <ctype.h> /* for isdigit() */
8 #include <errno.h> /* for global errno */ 8 #include <errno.h> /* for global errno */
9 #include <string.h> /* for strerror() */ 9 #include <string.h> /* for strerror() */
10 #include <stdlib.h> /* for malloc(), free() */ 10 #include <stdlib.h> /* for malloc(), free() */
11 #include <sys/ldr.h> 11 #include <sys/ldr.h>
12 12
13 13
14 #ifdef AIX_GENUINE_CPLUSPLUS 14 #ifdef AIX_GENUINE_CPLUSPLUS
15 #include <load.h> 15 #include <load.h>
16 #define aix_load loadAndInit 16 #define aix_load loadAndInit
17 #else 17 #else
18 #define aix_load load 18 #define aix_load load
19 #endif 19 #endif
20 20
21 21
22 extern char *Py_GetProgramName(void); 22 extern char *Py_GetProgramName(void);
23 23
24 typedef struct Module { 24 typedef struct Module {
25 struct Module *next; 25 struct Module *next;
26 void *entry; 26 void *entry;
27 } Module, *ModulePtr; 27 } Module, *ModulePtr;
28 28
29 const struct filedescr _PyImport_DynLoadFiletab[] = { 29 const struct filedescr _PyImport_DynLoadFiletab[] = {
30 {".so", "rb", C_EXTENSION, 0}, 30 {".so", "rb", C_EXTENSION},
31 {"module.so", "rb", C_EXTENSION, 1},
32 {0, 0} 31 {0, 0}
33 }; 32 };
34 33
35 static int 34 static int
36 aix_getoldmodules(void **modlistptr) 35 aix_getoldmodules(void **modlistptr)
37 { 36 {
38 register ModulePtr modptr, prevmodptr; 37 register ModulePtr modptr, prevmodptr;
39 register struct ld_info *ldiptr; 38 register struct ld_info *ldiptr;
40 register char *ldibuf; 39 register char *ldibuf;
41 register int errflag, bufsize = 1024; 40 register int errflag, bufsize = 1024;
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 if (aix_getoldmodules(&staticmodlistptr) == -1) 172 if (aix_getoldmodules(&staticmodlistptr) == -1)
174 return NULL; 173 return NULL;
175 p = (dl_funcptr) aix_load((char *)pathname, L_NOAUTODEFER, 0); 174 p = (dl_funcptr) aix_load((char *)pathname, L_NOAUTODEFER, 0);
176 if (p == NULL) { 175 if (p == NULL) {
177 aix_loaderror(pathname); 176 aix_loaderror(pathname);
178 return NULL; 177 return NULL;
179 } 178 }
180 179
181 return p; 180 return p;
182 } 181 }
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+