[Python-Dev] Python initialization and embedded Python (original) (raw)
Antoine Pitrou solipsis at pitrou.net
Wed Nov 22 06:19:52 EST 2017
- Previous message (by thread): [Python-Dev] Python initialization and embedded Python
- Next message (by thread): [Python-Dev] Python initialization and embedded Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, 22 Nov 2017 12:12:32 +0100 Victor Stinner <victor.stinner at gmail.com> wrote:
2017-11-22 12:04 GMT+01:00 Antoine Pitrou <solipsis at pitrou.net>: > IMHO this really needs a simple solution documented somewhere. Also, > hopefully when you do the wrong thing, you get a clear error message to > know how to fix your code?
Right now, calling PyMemRawMalloc() before calling PyRuntimeInitialize() calls the function at address NULL, so you get a segmentation fault.
Can we get something more readable? For example:
FATAL ERROR: PyMem_RawMalloc(): malloc function is NULL, did you call _PyRuntime_Initialize?
Regards
Antoine.
- Previous message (by thread): [Python-Dev] Python initialization and embedded Python
- Next message (by thread): [Python-Dev] Python initialization and embedded Python
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]