R_igraph_restore_pointer() creates an igraph_t from the R-side representation. After PR #813, this function got some error checking, but a bit more is needed.
On the R side, edge IDs are stored as doubles, which are the same in all platforms we support. However, on the C side, they may be of different types with a smaller range than a double:
- In C/igraph 0.9, they are
doubles, however, some of the igraph code won't work correctly if the values exceed the 32-bit signed integer range
- In C/igraph 0.10 they can either be 32-bit or 64-bit integers, depending on the platform. 32-bit platforms are still in use, e.g. Raspberry Pi
R_igraph_restore_pointer() should validate that vertex IDs are within the allowed range and will fit the target type that they are being copied to.
@krlmlr @Antonov548
R_igraph_restore_pointer()creates anigraph_tfrom the R-side representation. After PR #813, this function got some error checking, but a bit more is needed.On the R side, edge IDs are stored as
doubles, which are the same in all platforms we support. However, on the C side, they may be of different types with a smaller range than adouble:doubles, however, some of the igraph code won't work correctly if the values exceed the 32-bit signed integer rangeR_igraph_restore_pointer()should validate that vertex IDs are within the allowed range and will fit the target type that they are being copied to.@krlmlr @Antonov548