@@ -62,7 +62,7 @@ fn satrec_dealloc(self_obj: [*c]c.PyObject) callconv(.c) void {
6262 tle_copy .deinit ();
6363 allocator .destroy (t );
6464 }
65- if (py .pyType (self_obj )) | tp | if (tp .* .tp_free ) | free | free (@ptrCast (self ));
65+ if (py .pyType (self_obj )) | tp | if (tp .* .tp_free ) | free | free (@as ( ? * anyopaque , @ ptrCast (self ) ));
6666}
6767
6868/// Class method: twoline2rv(line1, line2, whichconst=WGS72) -> Satrec
@@ -97,15 +97,15 @@ fn satrec_twoline2rv(cls: [*c]c.PyObject, args: [*c]c.PyObject, kwds: [*c]c.PyOb
9797 // Parse TLE
9898 const tle = Tle .parseLines (line1 , line2 , allocator ) catch {
9999 py .raiseValue ("Failed to parse TLE lines" );
100- c .Py_DECREF (@ptrCast (self ));
100+ c .Py_DECREF (@as ([ * c ] c . PyObject , @ ptrCast (self ) ));
101101 return null ;
102102 };
103103
104104 const tle_ptr = allocator .create (Tle ) catch {
105105 py .raiseRuntime ("Out of memory" );
106106 var tle_copy = tle ;
107107 tle_copy .deinit ();
108- c .Py_DECREF (@ptrCast (self ));
108+ c .Py_DECREF (@as ([ * c ] c . PyObject , @ ptrCast (self ) ));
109109 return null ;
110110 };
111111 tle_ptr .* = tle ;
@@ -131,7 +131,7 @@ fn satrec_twoline2rv(cls: [*c]c.PyObject, args: [*c]c.PyObject, kwds: [*c]c.PyOb
131131
132132 const sgp4_ptr = allocator .create (Sgp4 ) catch {
133133 py .raiseRuntime ("Out of memory" );
134- c .Py_DECREF (@ptrCast (self ));
134+ c .Py_DECREF (@as ([ * c ] c . PyObject , @ ptrCast (self ) ));
135135 return null ;
136136 };
137137 sgp4_ptr .* = sgp4 ;
@@ -561,7 +561,7 @@ fn satrecarray_init(self_obj: [*c]c.PyObject, args: [*c]c.PyObject, _: [*c]c.PyO
561561fn satrecarray_dealloc (self_obj : [* c ]c.PyObject ) callconv (.c ) void {
562562 const self : * SatrecArrayObject = @ptrCast (@alignCast (self_obj ));
563563 shared .freeBatchFields (self );
564- if (py .pyType (self_obj )) | tp | if (tp .* .tp_free ) | free | free (@ptrCast (self ));
564+ if (py .pyType (self_obj )) | tp | if (tp .* .tp_free ) | free | free (@as ( ? * anyopaque , @ ptrCast (self ) ));
565565}
566566
567567/// propagate_into(times, positions, velocities, epoch_offsets) -> None
0 commit comments