Hi dev's
I have some problem with PyModule_AddIntConstant because max value for this function si long how can i make this unsigned long long?
PyModule_AddIntConstat problem
The problem here is that Python Integer objects can't hold the full range of an unsigned long. You need a Python Long object instead if the value falls out of range. Use PyLong_FromUnsignedLong() to create the Long object and PyModule_AddObject() to add it to the module. Alternately, if you're on a platform where size_t is at least as large as long, you can try using PyInt_FromSize_t(), which will create an Integer object if the value is small enough and a Long object if the value doesn't fit inside an Integer.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement