You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is because the __new__ function in the Polygon class does not allocate the vertices attribute. Instead, it relies on the pgPolygon_FromObject function to handle this. Here is the pg_polygon_new current implementation:
The issue can be fixed by merging in code change #157 and making the following changes:
Allocate memory for a double array in the "pg_polygon_new" function, with a minimum size of 6 (since the smallest polygon is a triangle)
Modify the "polygon init" function in Restructured Polygon internals #157 to resize memory as needed, in case the init function needs to allocate more than 3 vertices.
The text was updated successfully, but these errors were encountered:
The following program segfaults:
This is because the
__new__
function in the Polygon class does not allocate thevertices
attribute. Instead, it relies on thepgPolygon_FromObject
function to handle this. Here is thepg_polygon_new
current implementation:The issue can be fixed by merging in code change #157 and making the following changes:
The text was updated successfully, but these errors were encountered: