diff --git a/CHANGES b/CHANGES index a9c98673f2baab577c663fa23f7c61c83959b916..f4ba3354e450e4da3ac5098bad892dab6855d6c8 100644 --- a/CHANGES +++ b/CHANGES @@ -421,7 +421,7 @@ o Locale.Charset o The ancient syntax for arrays (string * was an alias for array(string)) has now been removed completely. -o Compatibility for pike versions before 7.2 is no longer available. +o Compatibility for pike versions before 7.4 is no longer available. o decode_value can no longer decode programs using the 'old style' program encoding. diff --git a/lib/master.pike.in b/lib/master.pike.in index fd07c9a4ebcf9b9fe7c60a3968d44db6a1609864..4d56771b4d84b3098fa4273fa8602ddcfeeee4ed 100644 --- a/lib/master.pike.in +++ b/lib/master.pike.in @@ -157,19 +157,19 @@ constant NoValue = typeof (no_value); // Some API compatibility stuff. -//! Pike 7.2 master compatibility interface. +//! Pike 7.4 master compatibility interface. //! //! Most of the interface is implemented via mixin, //! or overloading by more recent masters. //! //! This interface is used for compatibility with -//! Pike 7.2. +//! Pike 7.4. //! //! @deprecated predef::MasterObject //! //! @seealso //! @[get_compat_master()], @[master()], @[predef::MasterObject] -protected class Pike_7_2_master +protected class Pike_7_4_master { extern array(string) pike_include_path; extern array(string) pike_module_path; @@ -268,18 +268,6 @@ protected class Pike_7_2_master void remove_program_path(string tmp); mapping(string:program|NoValue) programs; - //! Make a new instance of a class. - //! - //! @note - //! This function should not be used. It is here for - //! compatibility reasons only. - local __deprecated__ object new(mixed prog, mixed ... args) - { - if(stringp(prog)) - prog=cast_to_program(prog,backtrace()[-2][0]); - return prog(@args); - } - void create(); extern mapping(program:object) objects; object cast_to_object(string oname, string current_file); @@ -305,7 +293,6 @@ protected class Pike_7_2_master extern object compilation_mutex; #endif - local __deprecated__(function) clone = new; constant master_efuns = ({}); class joinnode {}; extern mapping(string:mixed) fc; @@ -313,7 +300,6 @@ protected class Pike_7_2_master void compile_warning(string file,int line,string err); string read_include(string f); - string describe_program(program p); class Codec {}; constant bt_max_string_len = 1; @@ -361,14 +347,6 @@ protected class Pike_7_2_master extern multiset no_resolv; extern string ver; mapping get_default_module(); - local protected object Pike_7_2_compat_handler; - local mixed resolv(string identifier, string|void current_file) - { - if (!Pike_7_2_compat_handler) { - Pike_7_2_compat_handler = global::get_compilation_handler(7, 2); - } - return Pike_7_2_compat_handler->resolv(identifier, current_file); - } void runtime_warning(string where, string what, mixed ... args); protected int clipped; protected int canclip; @@ -382,48 +360,18 @@ protected class Pike_7_2_master extern object currentversion; extern mapping(object:object) compat_handler_cache; object get_compilation_handler(int major, int minor); - string _sprintf(int|void t); - object get_compat_master(int major, int minor) - { - // 0.0 .. 7.2 - if ((major < 7) || (major == 7) && (minor < 3)) - return this_program::this; - return get_compat_master(major, minor); - } - /* No missing symbols. */ -} + // --- -//! Pike 7.4 master compatibility interface. -//! -//! Most of the interface is implemented via mixin, -//! or overloading by more recent masters. -//! -//! This interface is used for compatibility with -//! Pike 7.3 and 7.4. -//! -//! @deprecated predef::MasterObject -//! -//! @seealso -//! @[get_compat_master()], @[master()], @[predef::MasterObject] -protected class Pike_7_4_master -{ - inherit Pike_7_2_master; #ifdef RESOLV_DEBUG void resolv_debug (sprintf_format fmt, sprintf_args... args); #endif void error(sprintf_format f, sprintf_args ... args); -#ifdef GETCWD_CACHE - protected extern string current_path; -#endif constant no_value = (<>); constant NoValue = typeof (no_value); string programs_reverse_lookup (program prog); program objects_reverse_lookup (object obj); string fc_reverse_lookup (object obj); - // Hide clone() and new(). - private local __deprecated__ object new(mixed prog, mixed ... args){} - private local __deprecated__(function) clone = new; void unregister(program p); program low_cast_to_program(string pname, string current_file, @@ -477,12 +425,11 @@ protected class Pike_7_4_master } object get_compat_master(int major, int minor) { - if ((major < 7) || ((major == 7) && (minor < 3))) - return Pike_7_2_master::get_compat_master(major, minor); - // 7.3 & 7.4 - if ((major == 7) && (minor < 5)) + // 0.0 .. 7.4 + if ((major < 7) || (major == 7) && (minor < 5)) return this_program::this; return get_compat_master(major, minor); + } /* No missing symbols. */ diff --git a/lib/modules/Tools.pmod/AutoDoc.pmod/BMMLParser.pike b/lib/modules/Tools.pmod/AutoDoc.pmod/BMMLParser.pike index c7b582d6957979c0d4371acdbc82ccb622547b6c..6e1f4784e0605e5b8b6311a32e2f3549c7fb345a 100644 --- a/lib/modules/Tools.pmod/AutoDoc.pmod/BMMLParser.pike +++ b/lib/modules/Tools.pmod/AutoDoc.pmod/BMMLParser.pike @@ -1,5 +1,5 @@ #!/usr/local/bin/pike -#pike 7.2 +#pike 7.4 // Parse BMML (Black Magic Markup Language) to AutoDoc XML. // Written by Fredrik Hubinette, dark sourceror and inventor of BMML. @@ -805,7 +805,7 @@ void traversedir(string path) string _prefix=prefix; - tmp=clone(FILE); + tmp=FILE(); if(tmp->open(path+"/.bmmlrc","r")) { while(tmp2=tmp->gets()) diff --git a/src/language.yacc b/src/language.yacc index 0bb450ae335f50f6d3de74241465c8350b67865d..c70e6a5225fe5bc185d3e0cc6d1eea10e5b838a7 100644 --- a/src/language.yacc +++ b/src/language.yacc @@ -3787,8 +3787,7 @@ idents2: idents SEE_PROTECTED| SEE_PRIVATE)) >= 0)) { struct reference *ref = Pike_compiler->new_program->identifier_references + i; - if (!TEST_COMPAT (7, 2) && - IDENTIFIER_IS_VARIABLE ( + if (IDENTIFIER_IS_VARIABLE ( ID_FROM_PTR (Pike_compiler->new_program, ref)->identifier_flags)) { /* Allowing local:: on variables would lead to pathological * behavior: If a non-local variable in a class is referenced @@ -3923,8 +3922,7 @@ inherit_specifier: string_or_identifier TOK_COLON_COLON } /* The top-level class does not have a name, so break here. */ if (depth == c->compilation_depth) break; - if (!TEST_COMPAT (7, 2) && - ID_FROM_INT (state->previous->new_program, + if (ID_FROM_INT (state->previous->new_program, state->parent_identifier)->name == $1->u.sval.u.string) { /* Name of surrounding class ==> Done. */ @@ -3937,18 +3935,14 @@ inherit_specifier: string_or_identifier TOK_COLON_COLON if (e == -1) { inherit_state = state; inherit_depth = depth; - if (TEST_COMPAT (7, 2)) { - my_yyerror("No such inherit %S.", $1->u.sval.u.string); - } else { - if ($1->u.sval.u.string == this_program_string) { - inherit_state = Pike_compiler; - inherit_depth = 0; - e = 0; - } - else - my_yyerror("No inherit or surrounding class %S.", - $1->u.sval.u.string); + if ($1->u.sval.u.string == this_program_string) { + inherit_state = Pike_compiler; + inherit_depth = 0; + e = 0; } + else + my_yyerror("No inherit or surrounding class %S.", + $1->u.sval.u.string); } free_node($1); $$ = e; @@ -4207,11 +4201,7 @@ low_idents: TOK_IDENTIFIER $2->u.sval.u.string, 1))) { if (Pike_compiler->compiler_pass == 2) { - if (TEST_COMPAT(7,2)) { - yywarning("Undefined identifier ::%S.", $2->u.sval.u.string); - } else { - my_yyerror("Undefined identifier ::%S.", $2->u.sval.u.string); - } + my_yyerror("Undefined identifier ::%S.", $2->u.sval.u.string); } $$=mkintnode(0); } diff --git a/src/lexer.h b/src/lexer.h index d277742efe88246073a238db3a21332afee4ebb0..1fd479bbfa05cb8e510b583078a320b67de93ef3 100644 --- a/src/lexer.h +++ b/src/lexer.h @@ -533,7 +533,7 @@ static int low_yylex(struct lex *lex, YYSTYPE *yylval) if(ISWORD("gauge")) return TOK_GAUGE; break; case TWO_CHAR('g','l'): - if (ISWORD("global") && !TEST_COMPAT(7,2)) return TOK_GLOBAL; + if (ISWORD("global")) return TOK_GLOBAL; break; case TWO_CHAR('i','f'): if(ISWORD("if")) return TOK_IF; diff --git a/src/modules/spider/testsuite.in b/src/modules/spider/testsuite.in index 1957bf41f5dbb1376c99805a1ddab11723e5f6e6..103507d7ef889e92cf0003e81b7b4e63eb073704 100644 --- a/src/modules/spider/testsuite.in +++ b/src/modules/spider/testsuite.in @@ -10,10 +10,6 @@ dnl parse_html define(test_spider,[[ test_eq([[ -#pike 7.2 -#pragma no_deprecation_warnings -$1]],$2) - test_eq([[ #pragma no_deprecation_warnings spider.$1]],$2) ]]) diff --git a/src/program.c b/src/program.c index 18086a20f73d049bd3cfe16cbe5242f6b7fb0255..d8d53135ed544bdb3aea4ab2a614a53942c16547 100644 --- a/src/program.c +++ b/src/program.c @@ -3029,10 +3029,10 @@ void low_start_new_program(struct program *p, #endif if (c->compilation_depth >= 1) { - if(TEST_COMPAT(7,2) || (c->lex.pragmas & ID_SAVE_PARENT)) + if(c->lex.pragmas & ID_SAVE_PARENT) { p->flags |= PROGRAM_USES_PARENT; - }else if (!(c->lex.pragmas & ID_DONT_SAVE_PARENT)) { + } else if (!(c->lex.pragmas & ID_DONT_SAVE_PARENT)) { struct pike_string *tmp=findstring("__pragma_save_parent__"); if(tmp) { @@ -5842,8 +5842,7 @@ PMOD_EXPORT int add_constant(struct pike_string *name, if(IDENTIFIERP(n)->id_flags & ID_FINAL) my_yyerror("Illegal to redefine 'final' identifier %S", name); - if(!TEST_COMPAT(7,2) && - IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program, + if(IDENTIFIER_IS_VARIABLE(ID_FROM_INT(Pike_compiler->new_program, n)->identifier_flags)) { my_yyerror("Illegal to redefine variable %S as constant.", name); diff --git a/src/testsuite.in b/src/testsuite.in index d363138e2e276103af38f37e3c04cee863a8e8fa..4a232f7450b929d50cc1352f6c785979468d890b 100644 --- a/src/testsuite.in +++ b/src/testsuite.in @@ -1,7 +1,6 @@ START_MARKER // This triggered a bug only if run sufficiently early. -test_compile_any([[#pike 7.2]]) test_compile_any([[#pike 7.4]]) test_compile_any([[#pike 7.6]]) test_compile_any([[#pike 7.8]]) diff --git a/src/version.h b/src/version.h index de92bf26685ac89d93cba19a51696d7d6ee00da2..9077f7448bc98f9ebe33efe1b497bb6b0e3087f7 100644 --- a/src/version.h +++ b/src/version.h @@ -9,7 +9,7 @@ #define PIKE_BUILD_VERSION 3 #define LOWEST_COMPAT_MAJOR 7 -#define LOWEST_COMPAT_MINOR 2 +#define LOWEST_COMPAT_MINOR 4 /* Prototypes begin here */ PMOD_EXPORT void f_version(INT32 args);