Changeset 388 for python/vendor/current/PC/os2emx
- Timestamp:
- Mar 19, 2014, 11:11:30 AM (11 years ago)
- Location:
- python/vendor/current/PC/os2emx
- Files:
-
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
python/vendor/current/PC/os2emx/Makefile
r2 r388 238 238 # Output file names 239 239 PYTHON_VER= 2.6 240 PYTHON_LIB= python2 6240 PYTHON_LIB= python27 241 241 PYTHON.LIB= $(PYTHON_LIB)_s$A 242 242 PYTHON.IMPLIB= $(PYTHON_LIB)$A … … 352 352 Python/getcompiler.c \ 353 353 Python/getcopyright.c \ 354 Python/getmtime.c \355 354 Python/getplatform.c \ 356 355 Python/getversion.c \ … … 364 363 Python/peephole.c \ 365 364 Python/pyarena.c \ 365 Python/pyctype.c \ 366 366 Python/pyfpe.c \ 367 367 Python/pymath.c \ … … 385 385 Objects/cellobject.c \ 386 386 Objects/classobject.c \ 387 Objects/capsule.c \ 387 388 Objects/cobject.c \ 388 389 Objects/codeobject.c \ -
python/vendor/current/PC/os2emx/README.os2emx
r2 r388 310 310 the value of the Makefile variable EXE_DIR to the appropriate directory. 311 311 312 3. If you wish the Python core DLL (python2 6.dll) to be installed in a312 3. If you wish the Python core DLL (python27.dll) to be installed in a 313 313 directory other than the directory in which the Python executables are 314 314 installed (by default, the PYTHONHOME directory), set the value of the -
python/vendor/current/PC/os2emx/config.c
r2 r388 103 103 struct _inittab _PyImport_Inittab[] = { 104 104 105 106 105 {"os2", initos2}, 106 {"signal", initsignal}, 107 107 #ifdef WITH_THREAD 108 108 {"thread", initthread}, 109 109 #endif 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 110 {"_codecs", init_codecs}, 111 {"_csv", init_csv}, 112 {"_locale", init_locale}, 113 {"_random", init_random}, 114 {"_sre", init_sre}, 115 {"_symtable", init_symtable}, 116 {"_weakref", init_weakref}, 117 {"array", initarray}, 118 {"binascii", initbinascii}, 119 {"cPickle", initcPickle}, 120 {"cStringIO", initcStringIO}, 121 {"_collections", init_collections}, 122 {"cmath", initcmath}, 123 {"datetime", initdatetime}, 124 {"dl", initdl}, 125 {"errno", initerrno}, 126 {"fcntl", initfcntl}, 127 {"_fileio", init_fileio}, 128 {"_functools", init_functools}, 129 {"_heapq", init_heapq}, 130 {"imageop", initimageop}, 131 {"itertools", inititertools}, 132 {"math", initmath}, 133 {"_md5", init_md5}, 134 {"operator", initoperator}, 135 {"_sha", init_sha}, 136 {"_sha256", init_sha256}, 137 {"_sha512", init_sha512}, 138 {"strop", initstrop}, 139 {"_struct", init_struct}, 140 {"termios", inittermios}, 141 {"time", inittime}, 142 {"timing", inittiming}, 143 {"xxsubtype", initxxsubtype}, 144 {"zipimport", initzipimport}, 145 145 #if !HAVE_DYNAMIC_LOADING 146 147 148 149 150 151 152 153 154 155 156 157 146 {"_curses", init_curses}, 147 {"_curses_panel", init_curses_panel}, 148 {"_hotshot", init_hotshot}, 149 {"_testcapi", init_testcapi}, 150 {"bsddb185", initbsddb185}, 151 {"bz2", initbz2}, 152 {"fpectl", initfpectl}, 153 {"fpetest", initfpetest}, 154 {"parser", initparser}, 155 {"pwd", initpwd}, 156 {"unicodedata", initunicodedata}, 157 {"zlib", initzlib}, 158 158 #ifdef USE_SOCKET 159 160 159 {"_socket", init_socket}, 160 {"select", initselect}, 161 161 #endif 162 162 #endif 163 163 /* -- ADDMODULE MARKER 2 -- */ 164 164 165 166 165 /* This module "lives in" with marshal.c */ 166 {"marshal", PyMarshal_Init}, 167 167 168 169 168 /* This lives it with import.c */ 169 {"imp", initimp}, 170 170 171 172 173 174 175 171 /* These entries are here for sys.builtin_module_names */ 172 {"__main__", NULL}, 173 {"__builtin__", NULL}, 174 {"sys", NULL}, 175 {"exceptions", NULL}, 176 176 177 178 177 /* This lives in gcmodule.c */ 178 {"gc", initgc}, 179 179 180 181 180 /* Sentinel */ 181 {0, 0} 182 182 }; -
python/vendor/current/PC/os2emx/dlfcn.c
r2 r388 47 47 48 48 typedef struct _track_rec { 49 50 51 52 49 char *name; 50 HMODULE handle; 51 void *id; 52 struct _track_rec *next; 53 53 } tDLLchain, *DLLchain; 54 54 55 static DLLchain dlload = NULL; 56 static char dlerr [256]; 55 static DLLchain dlload = NULL; /* A simple chained list of DLL names */ 56 static char dlerr [256]; /* last error text string */ 57 57 static void *last_id; 58 58 59 59 static DLLchain find_id(void *id) 60 60 { 61 62 63 64 65 66 67 61 DLLchain tmp; 62 63 for (tmp = dlload; tmp; tmp = tmp->next) 64 if (id == tmp->id) 65 return tmp; 66 67 return NULL; 68 68 } 69 69 … … 71 71 void *dlopen(char *filename, int flags) 72 72 { 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 73 HMODULE hm; 74 DLLchain tmp; 75 char err[256]; 76 char *errtxt; 77 int rc = 0, set_chain = 0; 78 79 for (tmp = dlload; tmp; tmp = tmp->next) 80 if (strnicmp(tmp->name, filename, 999) == 0) 81 break; 82 83 if (!tmp) 84 { 85 tmp = (DLLchain) malloc(sizeof(tDLLchain)); 86 if (!tmp) 87 goto nomem; 88 tmp->name = strdup(filename); 89 tmp->next = dlload; 90 set_chain = 1; 91 } 92 93 switch (rc = DosLoadModule((PSZ)&err, sizeof(err), filename, &hm)) 94 { 95 case NO_ERROR: 96 tmp->handle = hm; 97 if (set_chain) 98 { 99 do 100 last_id++; 101 while ((last_id == 0) || (find_id(last_id))); 102 tmp->id = last_id; 103 dlload = tmp; 104 } 105 return tmp->id; 106 case ERROR_FILE_NOT_FOUND: 107 case ERROR_PATH_NOT_FOUND: 108 errtxt = "module `%s' not found"; 109 break; 110 case ERROR_TOO_MANY_OPEN_FILES: 111 case ERROR_NOT_ENOUGH_MEMORY: 112 case ERROR_SHARING_BUFFER_EXCEEDED: 113 113 nomem: 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 114 errtxt = "out of system resources"; 115 break; 116 case ERROR_ACCESS_DENIED: 117 errtxt = "access denied"; 118 break; 119 case ERROR_BAD_FORMAT: 120 case ERROR_INVALID_SEGMENT_NUMBER: 121 case ERROR_INVALID_ORDINAL: 122 case ERROR_INVALID_MODULETYPE: 123 case ERROR_INVALID_EXE_SIGNATURE: 124 case ERROR_EXE_MARKED_INVALID: 125 case ERROR_ITERATED_DATA_EXCEEDS_64K: 126 case ERROR_INVALID_MINALLOCSIZE: 127 case ERROR_INVALID_SEGDPL: 128 case ERROR_AUTODATASEG_EXCEEDS_64K: 129 case ERROR_RELOCSRC_CHAIN_EXCEEDS_SEGLIMIT: 130 errtxt = "invalid module format"; 131 break; 132 case ERROR_INVALID_NAME: 133 errtxt = "filename doesn't match module name"; 134 break; 135 case ERROR_SHARING_VIOLATION: 136 case ERROR_LOCK_VIOLATION: 137 errtxt = "sharing violation"; 138 break; 139 case ERROR_INIT_ROUTINE_FAILED: 140 errtxt = "module initialization failed"; 141 break; 142 default: 143 errtxt = "cause `%s', error code = %d"; 144 break; 145 } 146 snprintf(dlerr, sizeof(dlerr), errtxt, &err, rc); 147 if (tmp) 148 { 149 if (tmp->name) 150 free(tmp->name); 151 free(tmp); 152 } 153 return 0; 154 154 } 155 155 … … 157 157 void *dlsym(void *handle, char *symbol) 158 158 { 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 159 int rc = 0; 160 PFN addr; 161 char *errtxt; 162 int symord = 0; 163 DLLchain tmp = find_id(handle); 164 165 if (!tmp) 166 goto inv_handle; 167 168 if (*symbol == '#') 169 symord = atoi(symbol + 1); 170 171 switch (rc = DosQueryProcAddr(tmp->handle, symord, symbol, &addr)) 172 { 173 case NO_ERROR: 174 return (void *)addr; 175 case ERROR_INVALID_HANDLE: 176 176 inv_handle: 177 178 179 180 181 182 183 184 185 186 187 188 189 } 190 191 /* free dynamical y-linked library */177 errtxt = "invalid module handle"; 178 break; 179 case ERROR_PROC_NOT_FOUND: 180 case ERROR_INVALID_NAME: 181 errtxt = "no symbol `%s' in module"; 182 break; 183 default: 184 errtxt = "symbol `%s', error code = %d"; 185 break; 186 } 187 snprintf(dlerr, sizeof(dlerr), errtxt, symbol, rc); 188 return NULL; 189 } 190 191 /* free dynamically-linked library */ 192 192 int dlclose(void *handle) 193 193 { 194 195 196 197 198 199 200 201 202 203 204 205 206 207 194 int rc; 195 DLLchain tmp = find_id(handle); 196 197 if (!tmp) 198 goto inv_handle; 199 200 switch (rc = DosFreeModule(tmp->handle)) 201 { 202 case NO_ERROR: 203 free(tmp->name); 204 dlload = tmp->next; 205 free(tmp); 206 return 0; 207 case ERROR_INVALID_HANDLE: 208 208 inv_handle: 209 210 211 212 213 214 215 216 209 strcpy(dlerr, "invalid module handle"); 210 return -1; 211 case ERROR_INVALID_ACCESS: 212 strcpy(dlerr, "access denied"); 213 return -1; 214 default: 215 return -1; 216 } 217 217 } 218 218 … … 220 220 char *dlerror() 221 221 { 222 223 } 222 return dlerr; 223 } -
python/vendor/current/PC/os2emx/dlfcn.h
r2 r388 43 43 void *dlsym(void *handle, char *symbol); 44 44 45 /* free dynamical y-linked library */45 /* free dynamically-linked library */ 46 46 int dlclose(void *handle); 47 47 -
python/vendor/current/PC/os2emx/dllentry.c
r2 r388 5 5 #define NULL 0 6 6 7 #define REF(s) 7 #define REF(s) extern void s(); void *____ref_##s = &s; 8 8 9 9 /* Make references to imported symbols to pull them from static library */ … … 19 19 unsigned long _DLL_InitTerm(unsigned long mod_handle, unsigned long flag) 20 20 { 21 22 23 24 25 26 21 switch (flag) 22 { 23 case 0: 24 if (_CRT_init()) 25 return 0; 26 __ctordtorInit(); 27 27 28 29 30 28 /* Ignore fatal signals */ 29 signal(SIGSEGV, SIG_IGN); 30 signal(SIGFPE, SIG_IGN); 31 31 32 32 return 1; 33 33 34 35 36 37 34 case 1: 35 __ctordtorTerm(); 36 _CRT_term(); 37 return 1; 38 38 39 40 41 39 default: 40 return 0; 41 } 42 42 } -
python/vendor/current/PC/os2emx/getpathp.c
r2 r388 5 5 /* ---------------------------------------------------------------- 6 6 PATH RULES FOR OS/2+EMX: 7 This describes how sys.path is formed on OS/2+EMX. It describes the 8 functionality, not the implementation (ie, the order in which these 7 This describes how sys.path is formed on OS/2+EMX. It describes the 8 functionality, not the implementation (ie, the order in which these 9 9 are actually fetched is different) 10 10 … … 17 17 is set, we believe it. Otherwise, we use the path of our host .EXE's 18 18 to try and locate our "landmark" (lib\\os.py) and deduce our home. 19 - If we DO have a Python Home: The relevant sub-directories (Lib, 19 - If we DO have a Python Home: The relevant sub-directories (Lib, 20 20 plat-win, lib-tk, etc) are based on the Python Home 21 21 - If we DO NOT have a Python Home, the core Python Path is 22 loaded from the registry. This is the main PythonPath key, 22 loaded from the registry. This is the main PythonPath key, 23 23 and both HKLM and HKCU are combined to form the path) 24 24 … … 33 33 the core path is deduced. 34 34 35 * When Python is hosted in another exe (different directory, embedded via 35 * When Python is hosted in another exe (different directory, embedded via 36 36 COM, etc), the Python Home will not be deduced, so the core path from 37 the registry is used. Other "application paths "in the registry are 37 the registry is used. Other "application paths "in the registry are 38 38 always read. 39 39 … … 86 86 87 87 static int 88 is_sep(char ch) 88 is_sep(char ch) /* determine if "ch" is a separator character */ 89 89 { 90 90 #ifdef ALTSEP 91 91 return ch == SEP || ch == ALTSEP; 92 92 #else 93 93 return ch == SEP; 94 94 #endif 95 95 } … … 101 101 reduce(char *dir) 102 102 { 103 104 105 106 107 } 108 103 size_t i = strlen(dir); 104 while (i > 0 && !is_sep(dir[i])) 105 --i; 106 dir[i] = '\0'; 107 } 108 109 109 static int 110 110 exists(char *filename) 111 111 { 112 113 112 struct stat buf; 113 return stat(filename, &buf) == 0; 114 114 } 115 115 116 116 /* Is module (check for .pyc/.pyo too) 117 * Assumes 'filename' MAXPATHLEN+1 bytes long - 117 * Assumes 'filename' MAXPATHLEN+1 bytes long - 118 118 * may extend 'filename' by one character. 119 119 */ … … 121 121 ismodule(char *filename) 122 122 { 123 124 125 126 127 128 129 130 131 132 123 if (exists(filename)) 124 return 1; 125 126 /* Check for the compiled version of prefix. */ 127 if (strlen(filename) < MAXPATHLEN) { 128 strcat(filename, Py_OptimizeFlag ? "o" : "c"); 129 if (exists(filename)) 130 return 1; 131 } 132 return 0; 133 133 } 134 134 … … 146 146 join(char *buffer, char *stuff) 147 147 { 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 148 size_t n, k; 149 if (is_sep(stuff[0])) 150 n = 0; 151 else { 152 n = strlen(buffer); 153 if (n > 0 && !is_sep(buffer[n-1]) && n < MAXPATHLEN) 154 buffer[n++] = SEP; 155 } 156 if (n > MAXPATHLEN) 157 Py_FatalError("buffer overflow in getpathp.c's joinpath()"); 158 k = strlen(stuff); 159 if (n + k > MAXPATHLEN) 160 k = MAXPATHLEN - n; 161 strncpy(buffer+n, stuff, k); 162 buffer[n+k] = '\0'; 163 163 } 164 164 … … 170 170 gotlandmark(char *landmark) 171 171 { 172 173 174 175 176 177 178 179 } 180 181 /* assumes argv0_path is MAXPATHLEN+1 bytes long, already \0 term'd. 172 int n, ok; 173 174 n = strlen(prefix); 175 join(prefix, landmark); 176 ok = ismodule(prefix); 177 prefix[n] = '\0'; 178 return ok; 179 } 180 181 /* assumes argv0_path is MAXPATHLEN+1 bytes long, already \0 term'd. 182 182 * assumption provided by only caller, calculate_path() 183 183 */ … … 185 185 search_for_prefix(char *argv0_path, char *landmark) 186 186 { 187 188 189 190 191 192 193 194 187 /* Search from argv0_path, until landmark is found */ 188 strcpy(prefix, argv0_path); 189 do { 190 if (gotlandmark(landmark)) 191 return 1; 192 reduce(prefix); 193 } while (prefix[0]); 194 return 0; 195 195 } 196 196 … … 199 199 get_progpath(void) 200 200 { 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 201 extern char *Py_GetProgramName(void); 202 char *path = getenv("PATH"); 203 char *prog = Py_GetProgramName(); 204 205 PPIB pib; 206 if ((DosGetInfoBlocks(NULL, &pib) == 0) && 207 (DosQueryModuleName(pib->pib_hmte, sizeof(progpath), progpath) == 0)) 208 return; 209 210 if (prog == NULL || *prog == '\0') 211 prog = "python"; 212 213 /* If there is no slash in the argv0 path, then we have to 214 * assume python is on the user's $PATH, since there's no 215 * other way to find a directory to start the search from. If 216 * $PATH isn't exported, you lose. 217 */ 218 218 #ifdef ALTSEP 219 219 if (strchr(prog, SEP) || strchr(prog, ALTSEP)) 220 220 #else 221 222 #endif 223 224 225 226 227 228 229 230 221 if (strchr(prog, SEP)) 222 #endif 223 strncpy(progpath, prog, MAXPATHLEN); 224 else if (path) { 225 while (1) { 226 char *delim = strchr(path, DELIM); 227 228 if (delim) { 229 size_t len = delim - path; 230 /* ensure we can't overwrite buffer */ 231 231 #if !defined(PYCC_GCC) 232 232 len = min(MAXPATHLEN,len); 233 233 #else 234 235 #endif 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 234 len = MAXPATHLEN < len ? MAXPATHLEN : len; 235 #endif 236 strncpy(progpath, path, len); 237 *(progpath + len) = '\0'; 238 } 239 else 240 strncpy(progpath, path, MAXPATHLEN); 241 242 /* join() is safe for MAXPATHLEN+1 size buffer */ 243 join(progpath, prog); 244 if (exists(progpath)) 245 break; 246 247 if (!delim) { 248 progpath[0] = '\0'; 249 break; 250 } 251 path = delim + 1; 252 } 253 } 254 else 255 progpath[0] = '\0'; 256 256 } 257 257 … … 259 259 calculate_path(void) 260 260 { 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 bufsz = 1; 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 261 char argv0_path[MAXPATHLEN+1]; 262 char *buf; 263 size_t bufsz; 264 char *pythonhome = Py_GetPythonHome(); 265 char *envpath = getenv("PYTHONPATH"); 266 char zip_path[MAXPATHLEN+1]; 267 size_t len; 268 269 get_progpath(); 270 /* progpath guaranteed \0 terminated in MAXPATH+1 bytes. */ 271 strcpy(argv0_path, progpath); 272 reduce(argv0_path); 273 if (pythonhome == NULL || *pythonhome == '\0') { 274 if (search_for_prefix(argv0_path, LANDMARK)) 275 pythonhome = prefix; 276 else 277 pythonhome = NULL; 278 } 279 else 280 strncpy(prefix, pythonhome, MAXPATHLEN); 281 282 if (envpath && *envpath == '\0') 283 envpath = NULL; 284 285 /* Calculate zip archive path */ 286 strncpy(zip_path, progpath, MAXPATHLEN); 287 zip_path[MAXPATHLEN] = '\0'; 288 len = strlen(zip_path); 289 if (len > 4) { 290 zip_path[len-3] = 'z'; /* change ending to "zip" */ 291 zip_path[len-2] = 'i'; 292 zip_path[len-1] = 'p'; 293 } 294 else { 295 zip_path[0] = 0; 296 } 297 298 /* We need to construct a path from the following parts. 299 * (1) the PYTHONPATH environment variable, if set; 300 * (2) the zip archive file path; 301 * (3) the PYTHONPATH config macro, with the leading "." 302 * of each component replaced with pythonhome, if set; 303 * (4) the directory containing the executable (argv0_path). 304 * The length calculation calculates #3 first. 305 */ 306 307 /* Calculate size of return buffer */ 308 if (pythonhome != NULL) { 309 char *p; 310 bufsz = 1; 311 for (p = PYTHONPATH; *p; p++) { 312 if (*p == DELIM) 313 bufsz++; /* number of DELIM plus one */ 314 } 315 bufsz *= strlen(pythonhome); 316 } 317 else 318 bufsz = 0; 319 bufsz += strlen(PYTHONPATH) + 1; 320 bufsz += strlen(argv0_path) + 1; 321 bufsz += strlen(zip_path) + 1; 322 if (envpath != NULL) 323 bufsz += strlen(envpath) + 1; 324 325 module_search_path = buf = malloc(bufsz); 326 if (buf == NULL) { 327 /* We can't exit, so print a warning and limp along */ 328 fprintf(stderr, "Can't malloc dynamic PYTHONPATH.\n"); 329 if (envpath) { 330 fprintf(stderr, "Using environment $PYTHONPATH.\n"); 331 module_search_path = envpath; 332 } 333 else { 334 fprintf(stderr, "Using default static path.\n"); 335 module_search_path = PYTHONPATH; 336 } 337 return; 338 } 339 340 if (envpath) { 341 strcpy(buf, envpath); 342 buf = strchr(buf, '\0'); 343 *buf++ = DELIM; 344 } 345 if (zip_path[0]) { 346 strcpy(buf, zip_path); 347 buf = strchr(buf, '\0'); 348 *buf++ = DELIM; 349 } 350 351 if (pythonhome == NULL) { 352 strcpy(buf, PYTHONPATH); 353 buf = strchr(buf, '\0'); 354 } 355 else { 356 char *p = PYTHONPATH; 357 char *q; 358 size_t n; 359 for (;;) { 360 q = strchr(p, DELIM); 361 if (q == NULL) 362 n = strlen(p); 363 else 364 n = q-p; 365 if (p[0] == '.' && is_sep(p[1])) { 366 strcpy(buf, pythonhome); 367 buf = strchr(buf, '\0'); 368 p++; 369 n--; 370 } 371 strncpy(buf, p, n); 372 buf += n; 373 if (q == NULL) 374 break; 375 *buf++ = DELIM; 376 p = q+1; 377 } 378 } 379 if (argv0_path) { 380 *buf++ = DELIM; 381 strcpy(buf, argv0_path); 382 buf = strchr(buf, '\0'); 383 } 384 *buf = '\0'; 385 385 } 386 386 … … 391 391 Py_GetPath(void) 392 392 { 393 394 395 393 if (!module_search_path) 394 calculate_path(); 395 return module_search_path; 396 396 } 397 397 … … 399 399 Py_GetPrefix(void) 400 400 { 401 402 403 401 if (!module_search_path) 402 calculate_path(); 403 return prefix; 404 404 } 405 405 … … 407 407 Py_GetExecPrefix(void) 408 408 { 409 409 return Py_GetPrefix(); 410 410 } 411 411 … … 413 413 Py_GetProgramFullPath(void) 414 414 { 415 416 417 418 } 415 if (!module_search_path) 416 calculate_path(); 417 return progpath; 418 } -
python/vendor/current/PC/os2emx/python27.def
r385 r388 1 LIBRARY python2 6INITINSTANCE TERMINSTANCE1 LIBRARY python27 INITINSTANCE TERMINSTANCE 2 2 DESCRIPTION "Python 2.6 Core DLL" 3 3 PROTMODE … … 5 5 EXPORTS 6 6 7 ; From python2 6_s.lib(config)7 ; From python27_s.lib(config) 8 8 "_PyImport_Inittab" 9 9 10 ; From python2 6_s.lib(dlfcn)10 ; From python27_s.lib(dlfcn) 11 11 ; "dlopen" 12 12 ; "dlsym" … … 14 14 ; "dlerror" 15 15 16 ; From python2 6_s.lib(getpathp)16 ; From python27_s.lib(getpathp) 17 17 "Py_GetProgramFullPath" 18 18 "Py_GetPrefix" … … 20 20 "Py_GetPath" 21 21 22 ; From python2 6_s.lib(getbuildinfo)22 ; From python27_s.lib(getbuildinfo) 23 23 "Py_GetBuildInfo" 24 24 "_Py_svnversion" 25 25 26 ; From python2 6_s.lib(main)26 ; From python27_s.lib(main) 27 27 "Py_Main" 28 28 "Py_GetArgcArgv" 29 29 30 ; From python2 6_s.lib(acceler)30 ; From python27_s.lib(acceler) 31 31 "PyGrammar_AddAccelerators" 32 32 "PyGrammar_RemoveAccelerators" 33 33 34 ; From python2 6_s.lib(grammar1)34 ; From python27_s.lib(grammar1) 35 35 "PyGrammar_FindDFA" 36 36 "PyGrammar_LabelRepr" 37 37 38 ; From python2 6_s.lib(listnode)38 ; From python27_s.lib(listnode) 39 39 "PyNode_ListTree" 40 40 41 ; From python2 6_s.lib(node)41 ; From python27_s.lib(node) 42 42 "PyNode_New" 43 43 "PyNode_AddChild" 44 44 "PyNode_Free" 45 45 46 ; From python2 6_s.lib(parser)46 ; From python27_s.lib(parser) 47 47 "PyParser_AddToken" 48 48 "PyParser_New" 49 49 "PyParser_Delete" 50 50 51 ; From python2 6_s.lib(parsetok)51 ; From python27_s.lib(parsetok) 52 52 "Py_TabcheckFlag" 53 53 "PyParser_ParseString" … … 57 57 "PyParser_ParseStringFlags" 58 58 59 ; From python2 6_s.lib(bitset)59 ; From python27_s.lib(bitset) 60 60 "_Py_newbitset" 61 61 "_Py_delbitset" … … 64 64 "_Py_mergebitset" 65 65 66 ; From python2 6_s.lib(metagrammar)66 ; From python27_s.lib(metagrammar) 67 67 "_Py_meta_grammar" 68 68 "Py_meta_grammar" 69 69 70 ; From python2 6_s.lib(tokenizer)70 ; From python27_s.lib(tokenizer) 71 71 "PyToken_OneChar" 72 72 "PyToken_TwoChars" … … 78 78 "_PyParser_TokenNames" 79 79 80 ; From python2 6_s.lib(myreadline)80 ; From python27_s.lib(myreadline) 81 81 "_PyOS_ReadlineTState" 82 82 "PyOS_ReadlineFunctionPointer" … … 85 85 "PyOS_InputHook" 86 86 87 ; From python2 6_s.lib(abstract)87 ; From python27_s.lib(abstract) 88 88 "_PyObject_LengthHint" 89 89 "PyMapping_Size" … … 176 176 "PyObject_IsSubclass" 177 177 178 ; From python2 6_s.lib(boolobject)178 ; From python27_s.lib(boolobject) 179 179 "PyBool_FromLong" 180 180 "PyBool_Type" … … 182 182 "_Py_TrueStruct" 183 183 184 ; From python2 6_s.lib(bufferobject)184 ; From python27_s.lib(bufferobject) 185 185 "PyBuffer_FromObject" 186 186 "PyBuffer_FromReadWriteObject" … … 190 190 "PyBuffer_Type" 191 191 192 ; From python2 6_s.lib(cellobject)192 ; From python27_s.lib(cellobject) 193 193 "PyCell_New" 194 194 "PyCell_Get" … … 196 196 "PyCell_Type" 197 197 198 ; From python2 6_s.lib(classobject)198 ; From python27_s.lib(classobject) 199 199 "PyClass_New" 200 200 "PyClass_IsSubclass" … … 211 211 "PyMethod_Type" 212 212 213 ; From python26_s.lib(cobject) 213 ; From python27_s.lib(capsule) 214 "PyCapsule_GetContext" 215 "PyCapsule_GetDestructor" 216 "PyCapsule_GetName" 217 "PyCapsule_GetPointer" 218 "PyCapsule_Import" 219 "PyCapsule_IsValid" 220 "PyCapsule_New" 221 "PyCapsule_SetContext" 222 "PyCapsule_SetDestructor" 223 "PyCapsule_SetName" 224 "PyCapsule_SetPointer" 225 226 ; From python27_s.lib(cobject) 214 227 "PyCObject_FromVoidPtr" 215 228 "PyCObject_FromVoidPtrAndDesc" … … 220 233 "PyCObject_Type" 221 234 222 ; From python2 6_s.lib(codeobject)235 ; From python27_s.lib(codeobject) 223 236 "PyCode_New" 224 237 "PyCode_Addr2Line" … … 226 239 "PyCode_Type" 227 240 228 ; From python2 6_s.lib(complexobject)241 ; From python27_s.lib(complexobject) 229 242 "_Py_c_pow" 230 243 "_Py_c_sum" … … 240 253 "PyComplex_Type" 241 254 242 ; From python2 6_s.lib(descrobject)255 ; From python27_s.lib(descrobject) 243 256 "PyWrapper_New" 244 257 "PyDescr_NewMethod" … … 251 264 "PyProperty_Type" 252 265 253 ; From python2 6_s.lib(dictobject)266 ; From python27_s.lib(dictobject) 254 267 "PyDict_New" 255 268 "PyDict_GetItem" … … 275 288 "PyDictIterItem_Type" 276 289 277 ; From python2 6_s.lib(enumobject)290 ; From python27_s.lib(enumobject) 278 291 "PyEnum_Type" 279 292 "PyReversed_Type" 280 293 281 ; From python2 6_s.lib(fileobject)294 ; From python27_s.lib(fileobject) 282 295 "PyFile_FromString" 283 296 "Py_UniversalNewlineFread" … … 295 308 "PyFile_Type" 296 309 297 ; From python2 6_s.lib(floatobject)310 ; From python27_s.lib(floatobject) 298 311 "PyFloat_FromString" 299 312 "PyFloat_AsDouble" … … 307 320 "PyFloat_AsString" 308 321 "_PyFloat_Init" 309 "PyFloat_AsStringEx"310 322 "PyFloat_Type" 311 323 312 ; From python2 6_s.lib(frameobject)324 ; From python27_s.lib(frameobject) 313 325 "PyFrame_New" 314 326 "PyFrame_FastToLocals" … … 320 332 "PyFrame_Type" 321 333 322 ; From python2 6_s.lib(funcobject)334 ; From python27_s.lib(funcobject) 323 335 "PyFunction_New" 324 336 "PyFunction_GetCode" … … 335 347 "PyStaticMethod_Type" 336 348 337 ; From python2 6_s.lib(genobject)349 ; From python27_s.lib(genobject) 338 350 "PyGen_New" 339 351 "PyGen_NeedsFinalizing" 340 352 "PyGen_Type" 341 353 342 ; From python2 6_s.lib(intobject)354 ; From python27_s.lib(intobject) 343 355 "PyInt_AsLong" 344 356 "PyInt_AsUnsignedLongMask" … … 355 367 "PyInt_Type" 356 368 357 ; From python2 6_s.lib(iterobject)369 ; From python27_s.lib(iterobject) 358 370 "PySeqIter_New" 359 371 "PyCallIter_New" … … 361 373 "PyCallIter_Type" 362 374 363 ; From python2 6_s.lib(listobject)375 ; From python27_s.lib(listobject) 364 376 "PyList_New" 365 377 "PyList_Append" … … 379 391 "PyListRevIter_Type" 380 392 381 ; From python2 6_s.lib(longobject)393 ; From python27_s.lib(longobject) 382 394 "PyLong_FromDouble" 383 395 "PyLong_AsLong" … … 409 421 "_PyLong_DigitValue" 410 422 411 ; From python2 6_s.lib(methodobject)423 ; From python27_s.lib(methodobject) 412 424 "PyCFunction_Call" 413 425 "Py_FindMethodInChain" … … 421 433 "PyCFunction_Type" 422 434 423 ; From python2 6_s.lib(moduleobject)435 ; From python27_s.lib(moduleobject) 424 436 "PyModule_New" 425 437 "_PyModule_Clear" … … 429 441 "PyModule_Type" 430 442 431 ; From python2 6_s.lib(object)443 ; From python27_s.lib(object) 432 444 "Py_DivisionWarningFlag" 433 445 "PyObject_Str" … … 482 494 "_PyTrash_delete_later" 483 495 484 ; From python2 6_s.lib(obmalloc)496 ; From python27_s.lib(obmalloc) 485 497 "PyObject_Malloc" 486 498 "PyObject_Free" 487 499 "PyObject_Realloc" 488 500 489 ; From python2 6_s.lib(rangeobject)501 ; From python27_s.lib(rangeobject) 490 502 "PyRange_Type" 491 503 492 ; From python2 6_s.lib(setobject)504 ; From python27_s.lib(setobject) 493 505 "PySet_Pop" 494 506 "PySet_New" … … 505 517 "PyFrozenSet_Type" 506 518 507 ; From python2 6_s.lib(sliceobject)519 ; From python27_s.lib(sliceobject) 508 520 "_PySlice_FromIndices" 509 521 "PySlice_GetIndices" … … 513 525 "PySlice_Type" 514 526 515 ; From python2 6_s.lib(stringobject)527 ; From python27_s.lib(stringobject) 516 528 "PyString_FromStringAndSize" 517 529 "PyString_InternInPlace" … … 544 556 "PyBaseString_Type" 545 557 546 ; From python2 6_s.lib(structseq)558 ; From python27_s.lib(structseq) 547 559 "PyStructSequence_InitType" 548 560 "PyStructSequence_New" 549 561 "PyStructSequence_UnnamedField" 550 562 551 ; From python2 6_s.lib(tupleobject)563 ; From python27_s.lib(tupleobject) 552 564 "PyTuple_New" 553 565 "PyTuple_Pack" … … 561 573 "PyTupleIter_Type" 562 574 563 ; From python2 6_s.lib(typeobject)575 ; From python27_s.lib(typeobject) 564 576 "PyType_IsSubtype" 565 577 "_PyType_Lookup" … … 572 584 "PySuper_Type" 573 585 574 ; From python2 6_s.lib(unicodeobject)586 ; From python27_s.lib(unicodeobject) 575 587 "PyUnicodeUCS2_Resize" 576 588 "PyUnicodeUCS2_FromOrdinal" … … 638 650 "PyUnicode_Type" 639 651 640 ; From python2 6_s.lib(unicodectype)652 ; From python27_s.lib(unicodectype) 641 653 "_PyUnicode_TypeRecords" 642 654 "_PyUnicodeUCS2_ToNumeric" … … 656 668 "_PyUnicodeUCS2_IsAlpha" 657 669 658 ; From python2 6_s.lib(weakrefobject)670 ; From python27_s.lib(weakrefobject) 659 671 "PyWeakref_NewRef" 660 672 "PyWeakref_NewProxy" … … 667 679 "_PyWeakref_CallableProxyType" 668 680 669 ; From python2 6_s.lib(Python-ast)681 ; From python27_s.lib(Python-ast) 670 682 ; "init_ast" 671 683 "Module" … … 726 738 "PyAST_mod2obj" 727 739 728 ; From python2 6_s.lib(asdl)740 ; From python27_s.lib(asdl) 729 741 "asdl_seq_new" 730 742 "asdl_int_seq_new" 731 743 732 ; From python2 6_s.lib(ast)744 ; From python27_s.lib(ast) 733 745 "PyAST_FromNode" 734 746 735 ; From python2 6_s.lib(bltinmodule)747 ; From python27_s.lib(bltinmodule) 736 748 "_PyBuiltin_Init" 737 749 "Py_FileSystemDefaultEncoding" 738 750 739 ; From python2 6_s.lib(exceptions)751 ; From python27_s.lib(exceptions) 740 752 "PyUnicodeEncodeError_GetStart" 741 753 "PyUnicodeDecodeError_GetStart" … … 813 825 "PyExc_MemoryErrorInst" 814 826 815 ; From python2 6_s.lib(ceval)827 ; From python27_s.lib(ceval) 816 828 "PyEval_EvalFrameEx" 817 829 "PyEval_CallObjectWithKeywords" … … 852 864 "_Py_Ticker" 853 865 854 ; From python2 6_s.lib(compile)866 ; From python27_s.lib(compile) 855 867 "_Py_Mangle" 856 868 "PyAST_Compile" … … 858 870 "Py_OptimizeFlag" 859 871 860 ; From python2 6_s.lib(codecs)872 ; From python27_s.lib(codecs) 861 873 "_PyCodec_Lookup" 862 874 "PyCodec_Encode" … … 877 889 "PyCodec_StrictErrors" 878 890 879 ; From python2 6_s.lib(errors)891 ; From python27_s.lib(errors) 880 892 "PyErr_SetNone" 881 893 "PyErr_SetString" … … 903 915 "PyErr_WarnExplicit" 904 916 905 ; From python2 6_s.lib(frozen)917 ; From python27_s.lib(frozen) 906 918 "PyImport_FrozenModules" 907 919 908 ; From python2 6_s.lib(frozenmain)920 ; From python27_s.lib(frozenmain) 909 921 "Py_FrozenMain" 910 922 911 ; From python2 6_s.lib(future)923 ; From python27_s.lib(future) 912 924 "PyFuture_FromAST" 913 925 914 ; From python2 6_s.lib(getargs)926 ; From python27_s.lib(getargs) 915 927 "PyArg_Parse" 916 928 "_PyArg_Parse_SizeT" … … 926 938 "_PyArg_VaParseTupleAndKeywords_SizeT" 927 939 928 ; From python2 6_s.lib(getcompiler)940 ; From python27_s.lib(getcompiler) 929 941 "Py_GetCompiler" 930 942 931 ; From python2 6_s.lib(getcopyright)943 ; From python27_s.lib(getcopyright) 932 944 "Py_GetCopyright" 933 945 934 ; From python26_s.lib(getmtime) 935 "PyOS_GetLastModificationTime" 936 937 ; From python26_s.lib(getplatform) 946 ; From python27_s.lib(getplatform) 938 947 "Py_GetPlatform" 939 948 940 ; From python2 6_s.lib(getversion)949 ; From python27_s.lib(getversion) 941 950 "Py_GetVersion" 942 951 943 ; From python2 6_s.lib(graminit)952 ; From python27_s.lib(graminit) 944 953 "_PyParser_Grammar" 945 954 946 ; From python2 6_s.lib(import)955 ; From python27_s.lib(import) 947 956 "_PyImport_Init" 948 957 "_PyImportHooks_Init" … … 971 980 "_PyImport_Filetab" 972 981 973 ; From python2 6_s.lib(importdl)982 ; From python27_s.lib(importdl) 974 983 "_PyImport_LoadDynamicModule" 975 984 976 ; From python2 6_s.lib(marshal)985 ; From python27_s.lib(marshal) 977 986 "PyMarshal_ReadLongFromFile" 978 987 "PyMarshal_WriteObjectToString" … … 985 994 "PyMarshal_Init" 986 995 987 ; From python2 6_s.lib(modsupport)996 ; From python27_s.lib(modsupport) 988 997 "Py_InitModule4" 989 998 "Py_BuildValue" … … 998 1007 "_Py_PackageContext" 999 1008 1000 ; From python2 6_s.lib(mysnprintf)1009 ; From python27_s.lib(mysnprintf) 1001 1010 "PyOS_snprintf" 1002 1011 "PyOS_vsnprintf" 1003 1012 1004 ; From python2 6_s.lib(mystrtoul)1013 ; From python27_s.lib(mystrtoul) 1005 1014 "PyOS_strtoul" 1006 1015 "PyOS_strtol" 1007 1016 1008 ; From python2 6_s.lib(pyarena)1017 ; From python27_s.lib(pyarena) 1009 1018 "PyArena_New" 1010 1019 "PyArena_Free" … … 1012 1021 "PyArena_AddPyObject" 1013 1022 1014 ; From python2 6_s.lib(pyfpe)1023 ; From python27_s.lib(pyfpe) 1015 1024 "PyFPE_dummy" 1016 1025 1017 ; From python2 6_s.lib(pystate)1026 ; From python27_s.lib(pystate) 1018 1027 "PyInterpreterState_Clear" 1019 1028 "PyThreadState_Clear" … … 1040 1049 "_PyThreadState_GetFrame" 1041 1050 1042 ; From python2 6_s.lib(pystrtod)1051 ; From python27_s.lib(pystrtod) 1043 1052 "PyOS_ascii_strtod" 1044 1053 "PyOS_ascii_formatd" 1045 1054 "PyOS_ascii_atof" 1046 1055 1047 ; From python2 6_s.lib(pythonrun)1056 ; From python27_s.lib(pythonrun) 1048 1057 "Py_IgnoreEnvironmentFlag" 1049 1058 "Py_DebugFlag" … … 1107 1116 "_Py_QnewFlag" 1108 1117 1109 ; From python2 6_s.lib(structmember)1118 ; From python27_s.lib(structmember) 1110 1119 "PyMember_Get" 1111 1120 "PyMember_GetOne" … … 1113 1122 "PyMember_Set" 1114 1123 1115 ; From python2 6_s.lib(symtable)1124 ; From python27_s.lib(symtable) 1116 1125 "PySymtable_Build" 1117 1126 "PySymtable_Free" … … 1120 1129 "PySTEntry_Type" 1121 1130 1122 ; From python2 6_s.lib(sysmodule)1131 ; From python27_s.lib(sysmodule) 1123 1132 "_PySys_Init" 1124 1133 "PySys_WriteStderr" … … 1134 1143 "PySys_AddWarnOption" 1135 1144 1136 ; From python2 6_s.lib(traceback)1145 ; From python27_s.lib(traceback) 1137 1146 "PyTraceBack_Here" 1138 1147 "PyTraceBack_Print" 1139 1148 "PyTraceBack_Type" 1140 1149 1141 ; From python2 6_s.lib(getopt)1150 ; From python27_s.lib(getopt) 1142 1151 "_PyOS_GetOpt" 1143 1152 "_PyOS_opterr" … … 1145 1154 "_PyOS_optarg" 1146 1155 1147 ; From python2 6_s.lib(dynload_shlib)1156 ; From python27_s.lib(dynload_shlib) 1148 1157 "_PyImport_DynLoadFiletab" 1149 1158 "_PyImport_GetDynLoadFunc" 1150 1159 1151 ; From python2 6_s.lib(thread)1160 ; From python27_s.lib(thread) 1152 1161 "PyThread_delete_key_value" 1153 1162 "PyThread_init_thread" … … 1165 1174 "PyThread_set_key_value" 1166 1175 "PyThread_get_key_value" 1167 "PyThread__exit_thread" 1168 1169 ; From python26_s.lib(gcmodule) 1176 1177 ; From python27_s.lib(gcmodule) 1170 1178 ; "initgc" 1171 1179 "_PyObject_GC_New" … … 1183 1191 "_PyGC_generation0" 1184 1192 1185 ; From python2 6_s.lib(signalmodule)1193 ; From python27_s.lib(signalmodule) 1186 1194 ; "initsignal" 1187 1195 "PyErr_CheckSignals" … … 1192 1200 "PyOS_AfterFork" 1193 1201 1194 ; From python2 6_s.lib(posixmodule)1202 ; From python27_s.lib(posixmodule) 1195 1203 ; "initos2" 1196 1204 1197 ; From python2 6_s.lib(threadmodule)1205 ; From python27_s.lib(threadmodule) 1198 1206 ; "initthread" 1199 1207 1200 ; From python2 6_s.lib(arraymodule)1208 ; From python27_s.lib(arraymodule) 1201 1209 ; "initarray" 1202 1210 ; "array_methods" 1203 1211 1204 ; From python2 6_s.lib(binascii)1212 ; From python27_s.lib(binascii) 1205 1213 ; "initbinascii" 1206 1214 1207 ; From python2 6_s.lib(cmathmodule)1215 ; From python27_s.lib(cmathmodule) 1208 1216 ; "initcmath" 1209 1217 1210 ; From python2 6_s.lib(_codecsmodule)1218 ; From python27_s.lib(_codecsmodule) 1211 1219 ; "init_codecs" 1212 1220 1213 ; From python2 6_s.lib(collectionsmodule)1221 ; From python27_s.lib(collectionsmodule) 1214 1222 ; "initcollections" 1215 1223 "dequeiter_type" 1216 1224 "dequereviter_type" 1217 1225 1218 ; From python2 6_s.lib(cPickle)1226 ; From python27_s.lib(cPickle) 1219 1227 ; "initcPickle" 1220 1228 ; "fast_save_leave" 1221 1229 1222 ; From python2 6_s.lib(cStringIO)1230 ; From python27_s.lib(cStringIO) 1223 1231 ; "initcStringIO" 1224 1232 1225 ; From python2 6_s.lib(_csv)1233 ; From python27_s.lib(_csv) 1226 1234 ; "init_csv" 1227 1235 1228 ; From python2 6_s.lib(datetimemodule)1236 ; From python27_s.lib(datetimemodule) 1229 1237 ; "initdatetime" 1230 1238 1231 ; From python2 6_s.lib(dlmodule)1239 ; From python27_s.lib(dlmodule) 1232 1240 ; "initdl" 1233 1241 1234 ; From python2 6_s.lib(errnomodule)1242 ; From python27_s.lib(errnomodule) 1235 1243 ; "initerrno" 1236 1244 1237 ; From python2 6_s.lib(fcntlmodule)1245 ; From python27_s.lib(fcntlmodule) 1238 1246 ; "initfcntl" 1239 1247 1240 ; From python2 6_s.lib(_functoolsmodule)1248 ; From python27_s.lib(_functoolsmodule) 1241 1249 ; "init_functools" 1242 1250 1243 ; From python2 6_s.lib(_heapqmodule)1251 ; From python27_s.lib(_heapqmodule) 1244 1252 ; "init_heapq" 1245 1253 1246 ; From python2 6_s.lib(imageop)1254 ; From python27_s.lib(imageop) 1247 1255 ; "initimageop" 1248 1256 1249 ; From python2 6_s.lib(itertoolsmodule)1257 ; From python27_s.lib(itertoolsmodule) 1250 1258 ; "inititertools" 1251 1259 1252 ; From python2 6_s.lib(_localemodule)1260 ; From python27_s.lib(_localemodule) 1253 1261 ; "init_locale" 1254 1262 1255 ; From python2 6_s.lib(mathmodule)1263 ; From python27_s.lib(mathmodule) 1256 1264 ; "initmath" 1257 1265 1258 ; From python2 6_s.lib(md5)1266 ; From python27_s.lib(md5) 1259 1267 "md5_finish" 1260 1268 "md5_init" 1261 1269 "md5_append" 1262 1270 1263 ; From python2 6_s.lib(md5module)1271 ; From python27_s.lib(md5module) 1264 1272 ; "init_md5" 1265 1273 1266 ; From python2 6_s.lib(operator)1274 ; From python27_s.lib(operator) 1267 1275 ; "initoperator" 1268 1276 1269 ; From python2 6_s.lib(_randommodule)1277 ; From python27_s.lib(_randommodule) 1270 1278 ; "init_random" 1271 1279 1272 ; From python2 6_s.lib(rgbimgmodule)1280 ; From python27_s.lib(rgbimgmodule) 1273 1281 ; "initrgbimg" 1274 1282 1275 ; From python2 6_s.lib(shamodule)1283 ; From python27_s.lib(shamodule) 1276 1284 ; "init_sha" 1277 1285 1278 ; From python2 6_s.lib(sha256module)1286 ; From python27_s.lib(sha256module) 1279 1287 ; "init_sha256" 1280 1288 1281 ; From python2 6_s.lib(sha512module)1289 ; From python27_s.lib(sha512module) 1282 1290 ; "init_sha512" 1283 1291 1284 ; From python2 6_s.lib(_sre)1292 ; From python27_s.lib(_sre) 1285 1293 ; "init_sre" 1286 1294 1287 ; From python2 6_s.lib(stropmodule)1295 ; From python27_s.lib(stropmodule) 1288 1296 ; "initstrop" 1289 1297 1290 ; From python2 6_s.lib(_struct)1298 ; From python27_s.lib(_struct) 1291 1299 ; "init_struct" 1292 1300 1293 ; From python2 6_s.lib(symtablemodule)1301 ; From python27_s.lib(symtablemodule) 1294 1302 ; "init_symtable" 1295 1303 1296 ; From python2 6_s.lib(termios)1304 ; From python27_s.lib(termios) 1297 1305 ; "inittermios" 1298 1306 1299 ; From python2 6_s.lib(timemodule)1307 ; From python27_s.lib(timemodule) 1300 1308 ; "inittime" 1301 1309 "_PyTime_DoubleToTimet" 1302 1310 ; "inittimezone" 1303 1311 1304 ; From python2 6_s.lib(timingmodule)1312 ; From python27_s.lib(timingmodule) 1305 1313 ; "inittiming" 1306 1314 1307 ; From python2 6_s.lib(_weakref)1315 ; From python27_s.lib(_weakref) 1308 1316 ; "init_weakref" 1309 1317 1310 ; From python2 6_s.lib(xxsubtype)1318 ; From python27_s.lib(xxsubtype) 1311 1319 ; "initxxsubtype" 1312 1320 1313 ; From python2 6_s.lib(zipimport)1321 ; From python27_s.lib(zipimport) 1314 1322 ; "initzipimport" -
python/vendor/current/PC/os2emx/pythonpm.c
r2 r388 28 28 typedef struct 29 29 { 30 31 32 33 30 int argc; 31 char **argv; 32 HWND Frame; 33 int running; 34 34 } arglist; 35 35 … … 46 46 main(int argc, char **argv) 47 47 { 48 49 50 51 52 53 54 55 56 57 58 59 48 ULONG FrameFlags = FCF_TITLEBAR | 49 FCF_SYSMENU | 50 FCF_SIZEBORDER | 51 FCF_HIDEBUTTON | 52 FCF_SHELLPOSITION | 53 FCF_TASKLIST; 54 HAB hab; 55 HMQ hmq; 56 HWND Client; 57 QMSG qmsg; 58 arglist args; 59 int python_tid; 60 60 61 62 63 61 /* init PM and create message queue */ 62 hab = WinInitialize(0); 63 hmq = WinCreateMsgQueue(hab, 0); 64 64 65 66 67 68 69 70 71 72 73 74 65 /* create a (hidden) Window to house the window procedure */ 66 args.Frame = WinCreateStdWindow(HWND_DESKTOP, 67 0, 68 &FrameFlags, 69 NULL, 70 "PythonPM", 71 0L, 72 0, 73 0, 74 &Client); 75 75 76 /* run Python interpreter in a thread */ 77 args.argc = argc; 78 args.argv = argv; 79 args.running = 0; 80 if (-1 == (python_tid = _beginthread(PythonThread, NULL, 1024 * 1024, &args))) 81 { 82 /* couldn't start thread */ 83 WinAlarm(HWND_DESKTOP, WA_ERROR); 84 PythonRC = 1; 85 } 86 else 87 { 88 /* process PM messages, until Python exits */ 89 while (WinGetMsg(hab, &qmsg, NULLHANDLE, 0, 0)) 90 WinDispatchMsg(hab, &qmsg); 91 if (args.running > 0) 92 DosKillThread(python_tid); 93 } 94 95 /* destroy window, shutdown message queue and PM */ 96 WinDestroyWindow(args.Frame); 97 WinDestroyMsgQueue(hmq); 98 WinTerminate(hab); 76 /* run Python interpreter in a thread */ 77 args.argc = argc; 78 args.argv = argv; 79 args.running = 0; 80 if (-1 == (python_tid = _beginthread(PythonThread, NULL, 1024 * 1024, &args))) 81 { 82 /* couldn't start thread */ 83 WinAlarm(HWND_DESKTOP, WA_ERROR); 84 PythonRC = 1; 85 } 86 else 87 { 88 /* process PM messages, until Python exits */ 89 while (WinGetMsg(hab, &qmsg, NULLHANDLE, 0, 0)) 90 WinDispatchMsg(hab, &qmsg); 91 if (args.running > 0) 92 DosKillThread(python_tid); 93 } 99 94 100 return PythonRC; 95 /* destroy window, shutdown message queue and PM */ 96 WinDestroyWindow(args.Frame); 97 WinDestroyMsgQueue(hmq); 98 WinTerminate(hab); 99 100 return PythonRC; 101 101 } 102 102 103 103 void PythonThread(void *argl) 104 104 { 105 106 105 HAB hab; 106 arglist *args; 107 107 108 109 108 /* PM initialisation */ 109 hab = WinInitialize(0); 110 110 111 112 113 114 111 /* start Python */ 112 args = (arglist *)argl; 113 args->running = 1; 114 PythonRC = Py_Main(args->argc, args->argv); 115 115 116 117 118 119 116 /* enter a critical section and send the termination message */ 117 DosEnterCritSec(); 118 args->running = 0; 119 WinPostMsg(args->Frame, WM_QUIT, NULL, NULL); 120 120 121 122 123 121 /* shutdown PM and terminate thread */ 122 WinTerminate(hab); 123 _endthread(); 124 124 }
Note:
See TracChangeset
for help on using the changeset viewer.