Void-safe migration guide

Revision as of 13:48, 6 February 2009 by Manus (Talk | contribs) (Prepare migration using 6.3 or 6.4 with the compatibility option)

Construction.png Not Ready for Review: This Page is Under Development!

Migrating your code to be void-safe is quite easy if you follow the recommendations presented in this document.

Prepare migration using 6.3 or 6.4 with the compatibility option

Compile your code using either 6.3 or 6.4 in compatibility mode. Then apply the following refactorings:

  • Search for callers of {CELL}.default_create and replace it by calling put instead and providing a sensible default value.
  • Search for callers of {READABLE_STRING_8}.make_from_c and {READABLE_STRING_32}.make_from_c. If you are using them as part of a creation instruction or a creation expression then nothing to be done. Otherwise we recommend you to replace the call by a call to from_c.
  • Search for callers of {C_STRING}.share_from_pointer and {C_STRING}.share_from_pointer_and_count and replace them by make_shared_from_pointer and make_shared_from_pointer_and_count when used as creation procedure, otherwise although it is ok to leave them as is, we recommend using set_shared_from_pointer and set_shared_from_pointer_and_count.

Compiling in void-safe mode with 6.4