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

@ -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)"},