Fix building with Python 3.12
Freestyle was using static PyLongObject's which relied on setting the it's integer value directly. Replace with PyLong_FromLong(..) which is used everywhere else. One reference to the internal integer value needed to be kept because Nature_Type sub-classes PyLong.
This commit is contained in:
@@ -76,9 +76,10 @@ int Interface1D_Init(PyObject *module)
|
||||
Py_INCREF(&Stroke_Type);
|
||||
PyModule_AddObject(module, "Stroke", (PyObject *)&Stroke_Type);
|
||||
|
||||
PyDict_SetItemString(Stroke_Type.tp_dict, "DRY_MEDIUM", BPy_MediumType_DRY_MEDIUM);
|
||||
PyDict_SetItemString(Stroke_Type.tp_dict, "HUMID_MEDIUM", BPy_MediumType_HUMID_MEDIUM);
|
||||
PyDict_SetItemString(Stroke_Type.tp_dict, "OPAQUE_MEDIUM", BPy_MediumType_OPAQUE_MEDIUM);
|
||||
PyDict_SetItemString(Stroke_Type.tp_dict, "DRY_MEDIUM", PyLong_FromLong(Stroke::DRY_MEDIUM));
|
||||
PyDict_SetItemString(Stroke_Type.tp_dict, "HUMID_MEDIUM", PyLong_FromLong(Stroke::HUMID_MEDIUM));
|
||||
PyDict_SetItemString(
|
||||
Stroke_Type.tp_dict, "OPAQUE_MEDIUM", PyLong_FromLong(Stroke::OPAQUE_MEDIUM));
|
||||
|
||||
if (PyType_Ready(&ViewEdge_Type) < 0) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user