This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author MrValdez
Recipients MrValdez
Date 2014-03-31.10:35:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396262123.2.0.239412802273.issue21110@psf.upfronthosting.co.za>
In-reply-to
Content
The example in the "Extending Embedded Python" (https://docs.python.org/3/extending/embedding.html#extending-embedded-python) takes up a lot of memory and slow downs the computer. I am using Windows 7 64bit, Python 3.4 64bit and gcc (rubenvb-4.8.0) 4.8.0.

Solution:

Apparently, you need to add this to your C program:

#define HAVE_SSIZE_T

I found the solution at (https://forums.embarcadero.com/message.jspa?messageID=581594). The page said that when adding the above, "this ensures that the type Py_ssize_t becomes __int64 instead of int."


Expected: 

The programmer should not see a simple program (that came from the main documentation, no less) causing slowdowns and high memory usage. The 64bit version of the Python installer was downloaded so the programmer should, at least, not need to know that they need this flag. 

Can the Python.h in the 64 bit builds automatically set the flag? Or, if this isn't feasible, add a note to the documentation that this flag exist.
History
Date User Action Args
2014-03-31 10:35:23MrValdezsetrecipients: + MrValdez
2014-03-31 10:35:23MrValdezsetmessageid: <1396262123.2.0.239412802273.issue21110@psf.upfronthosting.co.za>
2014-03-31 10:35:23MrValdezlinkissue21110 messages
2014-03-31 10:35:22MrValdezcreate