Skip to content
  • Kenneth Moreland's avatar
    Make icetUnsafeStateGet type safe. · f9a6354b
    Kenneth Moreland authored
    The previous version of icetUnsafeStateGet blindly cast whatever
    type was stored in the state variable to whatever the caller
    wanted.  If the caller got the type wrong, that would be hard to
    debug.  Replaced this method with several type-specific versions.
    This makes a compile-type check to be sure the user is storing
    the expected type into a compatible pointer and a run-time check
    to make sure that the expected pointer is what is actually
    stored.  If the run-time check fails, then a crash will probably
    still occur, but it will be much easier to diagnose.
    f9a6354b