summaryrefslogtreecommitdiffstats
path: root/Python/dynload_aix.c
Commit message (Collapse)AuthorAgeFilesLines
* closes bpo-42030: Remove legacy AIX dynload support (GH-22717)Kevin Adler2020-10-161-190/+0
| | | | | | | | Since c19c5a6, AIX builds have defaulted to using dynload_shlib over dynload_aix when dlopen is available. This function has been available since AIX 4.3, which went out of support in 2003, the same year the previously referenced commit was made. It has been nearly 20 years since a version of AIX has been supported which has not used dynload_shlib so there's no reason to keep this legacy code around.
* bpo-41894: Fix UnicodeDecodeError while loading native module (GH-22466)Kevin Adler2020-10-151-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running in a non-UTF-8 locale, if an error occurs while importing a native Python module (say because a dependent share library is missing), the error message string returned may contain non-ASCII code points causing a UnicodeDecodeError. PyUnicode_DecodeFSDefault is used for buffers which may contain filesystem paths. For consistency with os.strerror(), PyUnicode_DecodeLocale is used for buffers which contain system error messages. While the shortname parameter is always encoded in ASCII according to PEP 489, it is left decoded using PyUnicode_FromString to minimize the changes and since it should not affect the decoding (albeit _potentially_ slower). In dynload_hpux, since the error buffer contains a message generated from a static ASCII string and the module filesystem path, PyUnicode_DecodeFSDefault is used instead of PyUnicode_DecodeLocale as is used elsewhere. * bpo-41894: Fix bugs in dynload error msg handling For both dynload_aix and dynload_hpux, properly handle the possibility that decoding strings may return NULL and when such an error happens, properly decrement any previously decoded strings and return early. In addition, in dynload_aix, ensure that we pass the decoded string *object* pathname_ob to PyErr_SetImportError instead of the original pathname buffer. Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
* bpo-37752: Delete redundant Py_CHARMASK in normalizestring() (GH-15095)Jordon Xu2019-09-101-1/+1
|
* PEP 489: Multi-phase extension module initializationNick Coghlan2015-05-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | Known limitations of the current implementation: - documentation changes are incomplete - there's a reference leak I haven't tracked down yet The leak is most visible by running: ./python -m test -R3:3 test_importlib However, you can also see it by running: ./python -X showrefcount Importing the array or _testmultiphase modules, and then deleting them from both sys.modules and the local namespace shows significant increases in the total number of active references each cycle. By contrast, with _testcapi (which continues to use single-phase initialisation) the global refcounts stabilise after a couple of cycles.
* Issue #18722: Remove uses of the "register" keyword in C code.Antoine Pitrou2013-08-131-6/+6
|
* Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵Antoine Pitrou2013-02-091-2/+1
|\ | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag), mpdecimal (needs to build without Python.h).
| * Issue #17173: Remove uses of locale-dependent C functions (isalpha() etc.) ↵Antoine Pitrou2013-02-091-2/+1
| | | | | | | | | | | | | | | | in the interpreter. I've left a couple of them in: zlib (third-party lib), getaddrinfo.c (doesn't include Python.h, and probably obsolete), _sre.c (legitimate use for the re.LOCALE flag).
* | Issue #13959: Re-implement imp.get_suffixes() in Lib/imp.py.Brett Cannon2012-05-041-4/+1
| | | | | | | | | | | | This introduces a new function, imp.extension_suffixes(), which is currently undocumented. That is forthcoming once issue #14657 is resolved and how to expose file suffixes is decided.
* | Issue #14599: Support ImportError.path on AIX and HPUX when loadingBrett Cannon2012-04-201-1/+7
| | | | | | | | extension modules.
* | Issue #14040: Remove rarely used file name suffixes for C extensions (under ↵Antoine Pitrou2012-02-201-1/+0
| | | | | | | | | | | | POSIX mainly). This will improve import performance a bit (especially under importlib).
* | Use the new Py_ARRAY_LENGTH macroVictor Stinner2011-09-281-2/+1
| |
* | Issue #3080: Remove unused argument of _PyImport_GetDynLoadFunc()Victor Stinner2011-02-221-1/+1
|/ | | | The first argument, fqname, was not used.
* #730467: Another small AIX fix.Georg Brandl2011-02-151-1/+1
|
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-140/+140
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Fix SF bug #1072182, problems with signed characters.Neal Norwitz2005-12-191-1/+1
| | | | Most of these can be backported.
* Include Python.h first which defines _XOPEN_SOURCENeal Norwitz2003-03-221-3/+3
| | | | | which allows the file to compile and removes a warning about _XOPEN_SOURCE being redefined (works on AIX 4.3 and 5.1 at least).
* Fix SF #639945, 64-bit bug on AIXNeal Norwitz2002-12-311-3/+2
| | | | | | I can't test this on the snake farm (no aix box is working). This change works for the submitter seems correct. Can anybody test this on 32- and 64- bit AIX?
* SF patch 568629 by Oren Tirosh: types made callable.Guido van Rossum2002-06-141-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These built-in functions are replaced by their (now callable) type: slice() buffer() and these types can also be called (but have no built-in named function named after them) classobj (type name used to be "class") code function instance instancemethod (type name used to be "instance method") The module "new" has been replaced with a small backward compatibility placeholder in Python. A large portion of the patch simply removes the new module from various platform-specific build recipes. The following binary Mac project files still have references to it: Mac/Build/PythonCore.mcp Mac/Build/PythonStandSmall.mcp Mac/Build/PythonStandalone.mcp [I've tweaked the code layout and the doc strings here and there, and added a comment to types.py about StringTypes vs. basestring. --Guido]
* aix_loaderror(): Conversion of sprintf() to PyOS_snprintf() for bufferBarry Warsaw2001-11-281-1/+1
| | | | overrun avoidance.
* Fix the char* vs. const char* mismatch for the argument of aix_loaderror()Vladimir Marangozov2000-09-041-1/+1
|
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* ANSIfy as many declarations as possible.Thomas Wouters2000-07-221-1/+1
|
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-221-7/+3
| | | | declarations yet, those come later.
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Cleanup patches from Greg Stein:Guido van Rossum1999-12-221-1/+1
| | | | | | | | | | | | | | | | | | | * in import.c, #ifdef out references to dynamic loading based on HAVE_DYNAMIC_LOADING * clean out the platform-specific crud from importdl.c. [ maybe fold this function into import.c and drop the importdl.c file? Greg.] * change GetDynLoadFunc's "funcname" parameter to "shortname". change "name" to "fqname" for clarification. * each GetDynLoadFunc now creates its own funcname value. WARNING: as I mentioned previously, we may run into an issue with a missing "_" on some platforms. Testing will show this pretty quickly, however. * move pathname munging into dynload_shlib.c
* Vladimir Marangozov:Guido van Rossum1999-12-211-1/+1
| | | | | | Here's a patch that avoids a warning caused by the "const char* pathname" declaration for _PyImport_GetDynLoadFunc (in dynload_aix). The "aix_load" function's 1st arg is prototyped as "char *pathname".
* The old platform-specific contents of importdl.c, broken down into oneGuido van Rossum1999-12-201-0/+235
file per platform (really: per style of Dl API; e.g. all platforms using dlopen() are grouped together in dynload_shlib.c.). This is part of a set of patches by Greg Stein.