ice icon indicating copy to clipboard operation
ice copied to clipboard

Simplify python sequence marshaling

Open pepone opened this issue 1 year ago • 0 comments

I think we can simplify the implementation of IcePy::SequenceInfo::marshal by computing the size of the optionals sequences, when we are about to marshal it and not up front.

We currently do it here:

https://github.com/zeroc-ice/ice/blob/8e3d0b07ec0db6863a2185683beff7d011d63fd3/python/modules/IcePy/Types.cpp#L1458-L1505

But seems it would be simpler to move this logic to:

https://github.com/zeroc-ice/ice/blob/8e3d0b07ec0db6863a2185683beff7d011d63fd3/python/modules/IcePy/Types.cpp#L1507-L1544

This would avoid creating the sequence handlers twice.

pepone avatar Oct 17 '24 08:10 pepone