18. Backward Compatibility |
Pike is a language under active development. This can lead to incompatibilities between different versions of Pike. To alleviate this problem Pike has a backward compatibility layer.
The backward compatibility layer can be engaged in two ways; either by starting the Pike interpreter with the -V option, or by using the #pike preprocessor directive.
The backward compatibility layer affects both the compiler and the available modules.
The remainder of this chapter describes the main incompatibilities between the various versions of Pike and the current version.
18.1. Pike 7.6 |
18.1.1. Global Functions |
18.1.2. Modules |
The following modules and functions have moved or been renamed:
|
18.1.3. Compiler |
18.2. Pike 7.4 |
18.2.1. SQL Headerfiles |
Pike 7.4 had some SQL-related headerfiles msql.h, mysql.h and postgres.h that just performed import of the corresponding module, and nothing else.
18.2.2. Modules |
7.4::Standards.PKCS.Signature.build_digest() used to expect a 7.4::Crypto.md5 -style hash object as the second argument.
The lifetime for the Stdio.Fd object used by a 7.4::Stdio.File object could differ from the lifetime of the using object. This could in theory cause problems for code that uses Stdio.File()->dup() or Stdio.File()->assign() .
Destructing a locked 7.4::Thread.Mutex object had the effect of also destructing the corresponding key object.
7.4::Tools.Standalone.extract_autodoc had a different argument list.
7.4::explode_path() splitted a string on / on all systems except NT, where it spitted on both / and \.
The following modules and functions have moved, been renamed or been deleted:
|
18.2.3. Compiler |
18.3. Pike 7.2 |
18.3.1. Modules |
7.2::Parser.XML.Simple , 7.2::Parser.XML.Validating as well as 7.2::Parser.XML.Tree.parse_input() used to be more lenient.
Most functions in 7.2::Protocols.LDAP.client used to have different calling conventions.
7.2::Thread.Condition()->wait() used to support being called without a Thread.Mutex . This support was removed since it introduced race-conditions in almost all code that used the feature.
7.2::dirname() used to return "" for the path "/".
7.2::new() and 7.2::clone() have been obsoleted
by ((program)prog)(@args)
.
The following modules and functions have moved, been renamed or been deleted:
|
18.3.2. Compiler |
18.4. Pike 7.0 |
18.4.1. Simulate |
#include of <simulate.h> or import of the 7.0::Simulate module provided some compatibility with LPC.
The compatibility functions were 7.0::Simulate.member_array() , 7.0::Simulate.previous_object() , 7.0::Simulate.this_function() , 7.0::Simulate.get_function() , 7.0::Simulate.map_regexp() as well was various functions from the Array , String and Process modules.
The following functions were provided under alternate names:
|
A single mathematical constant was also provided; 7.0::Simulate.PI with a value close to 3.1415926535897932384626433832795080.
18.4.2. Modules |
The 7.0::Colors module contained lots of color definitions with three-element arrays containing the Red, Green and Blue components. These color definitions are now provided by the Image.Colors module.
7.0::Stdio.File()->stat() and 7.0::Stdio.FILE()->stat() as well as 7.2::file_stat() used to return an array with integers and not a Stdio.Stat object.
7.0::_typeof() used to return a string and not a type.
7.0::m_delete() used to return the mapping and not the deleted value.
The following modules and functions have moved or been renamed:
|
18.4.3. Compiler |
18.5. Pike 0.6 |
18.5.1. Laxer Types |
Several functions, including 0.6::Array.map and 0.6::aggregate , had much more lenient types than in later versions.
18.5.2. readline |
There was a global function 0.6::readline() that provided some simple readline support. This was obsoleted by the Readline module.