remove last vestiges of php4 and encourage use of -php rather than -php5

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10969 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-12-06 23:15:20 +00:00
commit 06b2eca75e
14 changed files with 42 additions and 35 deletions

View file

@ -1,6 +1,14 @@
Version 1.3.37 (in progress)
============================
2008-12-02: wsfulton
[PHP] Deprecate %pragma(php4). Please use %pragma(php) instead.
The following two warnings have been renamed:
WARN_PHP4_MULTIPLE_INHERITANCE -> WARN_PHP_MULTIPLE_INHERITANCE
WARN_PHP4_UNKNOWN_PRAGMA -> WARN_PHP_UNKNOWN_PRAGMA
*** POTENTIAL INCOMPATIBILITY ***
2008-12-04: bhy
[Python] Applied patch SF#2158938: all the SWIG symbol names started with Py
are changed, since they are inappropriate and discouraged in Python

View file

@ -3114,7 +3114,7 @@ entirely upcased.
<p>
At the end of the new section is the place to put the aforementioned
nickname kludges (should they be needed). See Perl5 and Php4 for
nickname kludges (should they be needed). See Perl5 for
examples of what to do. [If this is still unclear after you've read
the code, ping me and I'll expand on this further. --ttn]
</p>

View file

@ -413,7 +413,7 @@ Overloaded Functions and Methods</a>.
<!-- This isn't correct for 1.3.30 and needs rewriting to reflect reality
<p>
Because PHP4 is a dynamically typed language, simple values can be
Because PHP is a dynamically typed language, simple values can be
silently converted from one type to another. For example, integers,
doubles and strings silently convert to each other depending on
context. This situation make overloading slightly problematic because
@ -433,7 +433,7 @@ PHP. The string <tt>"2"</tt> simultaneously represents the integer
<p>
In order to provide the most natural experience to PHP programmers,
the default <tt>%typecheck</tt> implemented in <tt>php4.swg</tt>
the default <tt>%typecheck</tt> implemented in <tt>php.swg</tt>
allows any simple type (integer, double, string) in PHP to be used for
any simple C type (int, double, char *). The function selected then
depends only on the argument type precedence defined by SWIG.
@ -783,7 +783,7 @@ Ko::threats();
<p>
Note: Currently pragmas for PHP need to be specified using
<tt>%pragma(php4)</tt> but also apply for PHP5! This is just a historical
<tt>%pragma(php)</tt> but also apply for PHP5! This is just a historical
oddity because SWIG's PHP support predates PHP5.
</p>
@ -795,7 +795,7 @@ object.
<div class="code"><pre>
%module example
%pragma(php4) code="
%pragma(php) code="
# This code is inserted into example.php
echo \"example.php execution\\n\";
"
@ -817,7 +817,7 @@ the example.php file.
<div class="code"><pre>
%module example
%pragma(php4) code="
%pragma(php) code="
include \"include.php\";
"
%pragma(php) include="include.php" // equivalent.
@ -831,7 +831,7 @@ phpinfo() function.
<div class="code"><pre>
%module example;
%pragma(php4) phpinfo="
%pragma(php) phpinfo="
zend_printf("An example of PHP support through SWIG\n");
php_info_print_table_start();
php_info_print_table_header(2, \"Directive\", \"Value\");

View file

@ -118,7 +118,6 @@ SWIGOCAML Defined when using Ocaml
SWIGPERL Defined when using Perl
SWIGPERL5 Defined when using Perl5
SWIGPHP Defined when using PHP
SWIGPHP4 Defined when using PHP4
SWIGPHP5 Defined when using PHP5
SWIGPIKE Defined when using Pike
SWIGPYTHON Defined when using Python

View file

@ -120,7 +120,7 @@ can be obtained by typing <tt>swig -help</tt> or <tt>swig
-mzscheme Generate Mzscheme wrappers
-ocaml Generate Ocaml wrappers
-perl Generate Perl wrappers
-php5 Generate PHP5 wrappers
-php Generate PHP wrappers
-pike Generate Pike wrappers
-python Generate Python wrappers
-r Generate R (aka GNU S) wrappers

View file

@ -558,7 +558,7 @@ example.i(4): Syntax error in input.
</ul>
<ul>
<li>870. Warning for <em>classname</em>: Base <em>baseclass</em> ignored. Multiple inheritance is not supported in Php4. (Php).
<li>870. Warning for <em>classname</em>: Base <em>baseclass</em> ignored. Multiple inheritance is not supported in PHP.
<li>871. Unrecognized pragma <em>pragma</em>. (Php).
</ul>

View file

@ -753,7 +753,7 @@ PHP_INCLUDE = @PHPINC@
PHP_SO = @PHP_SO@
php: $(SRCS)
$(SWIG) -php5 $(SWIGOPT) $(INTERFACEPATH)
$(SWIG) -php $(SWIGOPT) $(INTERFACEPATH)
$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PHP_INCLUDE)
$(LDSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)
@ -762,7 +762,7 @@ php: $(SRCS)
# --------------------------------------------------------------------
php_cpp: $(SRCS)
$(SWIG) -php5 -cppext cxx -c++ $(SWIGOPT) $(INTERFACEPATH)
$(SWIG) -php -cppext cxx -c++ $(SWIGOPT) $(INTERFACEPATH)
$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP_INCLUDE)
$(CXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(LIBPREFIX)$(TARGET)$(PHP_SO)

View file

@ -21,11 +21,11 @@
zend_printf("This was %%rshutdown\n");
}
%pragma(php4) include="include.php";
%pragma(php) include="include.php";
%pragma(php4) code="
%pragma(php) code="
# This code is inserted into example.php
echo \"this was php4 code\\n\";
echo \"this was php code\\n\";
"
%pragma(php4) phpinfo="php_info_print_table_start();"
%pragma(php) phpinfo="php_info_print_table_start();"

View file

@ -19,7 +19,7 @@
%include <chicken/chickenkw.swg>
%include <csharp/csharpkw.swg>
%include <java/javakw.swg>
%include <php4/php4kw.swg>
%include <php/php.swg>
%include <pike/pikekw.swg>
%include <python/pythonkw.swg>
%include <ocaml/ocamlkw.swg>

View file

@ -70,8 +70,8 @@ static int default_error_code = E_ERROR;
if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else
/* Standard SWIG API */
#define SWIG_GetModule(clientdata) SWIG_Php4_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php4_SetModule(pointer)
#define SWIG_GetModule(clientdata) SWIG_Php_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php_SetModule(pointer)
/* used to wrap returned objects in so we know whether they are newobject
and need freeing, or not */
@ -199,7 +199,7 @@ SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty, int flags TSRMLS_DC
}
static char const_name[] = "swig_runtime_data_type_pointer";
static swig_module_info *SWIG_Php4_GetModule() {
static swig_module_info *SWIG_Php_GetModule() {
zval *pointer;
swig_module_info *ret = 0;
@ -216,7 +216,7 @@ static swig_module_info *SWIG_Php4_GetModule() {
return ret;
}
static void SWIG_Php4_SetModule(swig_module_info *pointer) {
static void SWIG_Php_SetModule(swig_module_info *pointer) {
TSRMLS_FETCH();
REGISTER_MAIN_LONG_CONSTANT(const_name, (long) pointer, 0);
}

View file

@ -4,7 +4,7 @@
*
* typemaps.i.
*
* SWIG Typemap library for PHP4.
* SWIG Typemap library for PHP.
*
* This library provides standard typemaps for modifying SWIG's behavior.
* With enough entries in this file, I hope that very few people actually

View file

@ -252,8 +252,8 @@
* PHP4 versions of new warnings since existing user interface files can't
* be using them.
*/
#define WARN_PHP4_MULTIPLE_INHERITANCE 870
#define WARN_PHP4_UNKNOWN_PRAGMA 871
#define WARN_PHP_MULTIPLE_INHERITANCE 870
#define WARN_PHP_UNKNOWN_PRAGMA 871
#define WARN_PHP_MULTIPLE_INHERITANCE 870
#define WARN_PHP_UNKNOWN_PRAGMA 871

View file

@ -48,13 +48,13 @@ char cvsroot_php_cxx[] = "$Id$";
#include <errno.h>
static const char *usage = (char *) "\
PHP Options (available with -php5)\n\
PHP Options (available with -php)\n\
-cppext - cpp file extension (default to .cpp)\n\
-noproxy - Don't generate proxy classes.\n\
-prefix <prefix> - Prepend <prefix> to all class names in PHP5 wrappers\n\
-prefix <prefix> - Prepend <prefix> to all class names in PHP wrappers\n\
\n";
/* The original class wrappers for PHP4 stored the pointer to the C++ class in
/* The original class wrappers for PHP stored the pointer to the C++ class in
* the object property _cPtr. If we use the same name for the member variable
* which we put the pointer to the C++ class in, then the flat function
* wrappers will automatically pull it out without any changes being required.
@ -240,7 +240,7 @@ public:
Preprocessor_define("SWIGPHP 1", 0);
Preprocessor_define("SWIGPHP5 1", 0);
SWIG_typemap_lang("php4");
SWIG_typemap_lang("php");
SWIG_config_file("php.swg");
allow_overloading();
}
@ -1576,8 +1576,8 @@ public:
*
* Pragma directive.
*
* %pragma(php4) code="String" # Includes a string in the .php file
* %pragma(php4) include="file.pl" # Includes a file in the .php file
* %pragma(php) code="String" # Includes a string in the .php file
* %pragma(php) include="file.pl" # Includes a file in the .php file
*/
virtual int pragmaDirective(Node *n) {
@ -1586,7 +1586,7 @@ public:
String *type = Getattr(n, "name");
String *value = Getattr(n, "value");
if (Strcmp(lang, "php4") == 0) {
if (Strcmp(lang, "php") == 0 || Strcmp(lang, "php4") == 0) {
if (Strcmp(type, "code") == 0) {
if (value) {
Printf(pragma_code, "%s\n", value);
@ -2071,6 +2071,6 @@ extern "C" Language *swig_php4(void) {
return NULL; // To avoid compiler warnings.
}
extern "C" Language *swig_php5(void) {
extern "C" Language *swig_php(void) {
return new_swig_php();
}

View file

@ -32,8 +32,8 @@ extern "C" {
Language *swig_modula3(void);
Language *swig_mzscheme(void);
Language *swig_java(void);
Language *swig_php(void);
Language *swig_php4(void);
Language *swig_php5(void);
Language *swig_ocaml(void);
Language *swig_octave(void);
Language *swig_pike(void);
@ -74,9 +74,9 @@ static swig_module modules[] = {
{"-octave", swig_octave, "Octave"},
{"-perl", swig_perl5, "Perl"},
{"-perl5", swig_perl5, 0},
{"-php", swig_php5, 0},
{"-php", swig_php, "PHP"},
{"-php4", swig_php4, 0},
{"-php5", swig_php5, "PHP5"},
{"-php5", swig_php, 0},
{"-pike", swig_pike, "Pike"},
{"-python", swig_python, "Python"},
{"-r", swig_r, "R (aka GNU S)"},