@@ -2,6 +2,7 @@ use std::ptr::NonNull;
22
33use crate :: bindings as ll_bindings;
44use crate :: metadata;
5+ use crate :: sys;
56use crate :: Position ;
67use crate :: SizeType ;
78use crate :: Time ;
@@ -199,7 +200,7 @@ impl MigrationTable {
199200 /// * `Some(position)` if `row` is valid.
200201 /// * `None` otherwise.
201202 pub fn left < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < Position > {
202- unsafe_tsk_column_access_and_map_into ! ( row. into( ) , 0 , self . num_rows ( ) , self . as_ref ( ) , left )
203+ sys :: tsk_column_access :: < Position , _ , _ , _ > ( row. into ( ) , self . as_ref ( ) . left , self . num_rows ( ) )
203204 }
204205
205206 /// Return the right coordinate for a given row.
@@ -209,7 +210,11 @@ impl MigrationTable {
209210 /// * `Some(positions)` if `row` is valid.
210211 /// * `None` otherwise.
211212 pub fn right < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < Position > {
212- unsafe_tsk_column_access_and_map_into ! ( row. into( ) , 0 , self . num_rows( ) , self . as_ref( ) , right)
213+ sys:: tsk_column_access :: < Position , _ , _ , _ > (
214+ row. into ( ) ,
215+ self . as_ref ( ) . right ,
216+ self . num_rows ( ) ,
217+ )
213218 }
214219
215220 /// Return the node for a given row.
@@ -219,7 +224,7 @@ impl MigrationTable {
219224 /// * `Some(node)` if `row` is valid.
220225 /// * `None` otherwise.
221226 pub fn node < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < NodeId > {
222- unsafe_tsk_column_access ! ( row. into( ) , 0 , self . num_rows ( ) , self . as_ref ( ) , node , NodeId )
227+ sys :: tsk_column_access :: < NodeId , _ , _ , _ > ( row. into ( ) , self . as_ref ( ) . node , self . num_rows ( ) )
223228 }
224229
225230 /// Return the source population for a given row.
@@ -229,13 +234,10 @@ impl MigrationTable {
229234 /// * `Some(population)` if `row` is valid.
230235 /// * `None` otherwise.
231236 pub fn source < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < PopulationId > {
232- unsafe_tsk_column_access ! (
237+ sys :: tsk_column_access :: < PopulationId , _ , _ , _ > (
233238 row. into ( ) ,
234- 0 ,
239+ self . as_ref ( ) . source ,
235240 self . num_rows ( ) ,
236- self . as_ref( ) ,
237- source,
238- PopulationId
239241 )
240242 }
241243
@@ -246,13 +248,10 @@ impl MigrationTable {
246248 /// * `Some(population)` if `row` is valid.
247249 /// * `None` otherwise.
248250 pub fn dest < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < PopulationId > {
249- unsafe_tsk_column_access ! (
251+ sys :: tsk_column_access :: < PopulationId , _ , _ , _ > (
250252 row. into ( ) ,
251- 0 ,
253+ self . as_ref ( ) . dest ,
252254 self . num_rows ( ) ,
253- self . as_ref( ) ,
254- dest,
255- PopulationId
256255 )
257256 }
258257
@@ -263,7 +262,7 @@ impl MigrationTable {
263262 /// * `Some(time)` if `row` is valid.
264263 /// * `None` otherwise.
265264 pub fn time < M : Into < MigrationId > + Copy > ( & self , row : M ) -> Option < Time > {
266- unsafe_tsk_column_access_and_map_into ! ( row. into( ) , 0 , self . num_rows ( ) , self . as_ref ( ) , time )
265+ sys :: tsk_column_access :: < Time , _ , _ , _ > ( row. into ( ) , self . as_ref ( ) . time , self . num_rows ( ) )
267266 }
268267
269268 /// Retrieve decoded metadata for a `row`.
0 commit comments