aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2008-12-06 23:15:20 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2008-12-06 23:15:20 +0000
commit06b2eca75e456b14b030dd8813e9503ae2961fed (patch)
treeaec2794b7d3c7155df5ba0b09bbfef5bcb7d3e48
parenta5fcddceca1f55432928af02530c873cb7992382 (diff)
downloadswig-06b2eca75e456b14b030dd8813e9503ae2961fed.tar.gz
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
-rw-r--r--CHANGES.current8
-rw-r--r--Doc/Manual/Extending.html2
-rw-r--r--Doc/Manual/Php.html12
-rw-r--r--Doc/Manual/Preprocessor.html1
-rw-r--r--Doc/Manual/SWIG.html2
-rw-r--r--Doc/Manual/Warnings.html2
-rw-r--r--Examples/Makefile.in4
-rw-r--r--Examples/php/pragmas/example.i8
-rw-r--r--Lib/allkw.swg2
-rw-r--r--Lib/php/phprun.swg8
-rw-r--r--Lib/php/typemaps.i2
-rw-r--r--Source/Include/swigwarn.h4
-rw-r--r--Source/Modules/php.cxx16
-rw-r--r--Source/Modules/swigmain.cxx6
14 files changed, 42 insertions, 35 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 915cbc732..8431febfd 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -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
diff --git a/Doc/Manual/Extending.html b/Doc/Manual/Extending.html
index 5639663a1..e4d5cdb92 100644
--- a/Doc/Manual/Extending.html
+++ b/Doc/Manual/Extending.html
@@ -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>
diff --git a/Doc/Manual/Php.html b/Doc/Manual/Php.html
index 20530ad86..aeb171b3f 100644
--- a/Doc/Manual/Php.html
+++ b/Doc/Manual/Php.html
@@ -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\");
diff --git a/Doc/Manual/Preprocessor.html b/Doc/Manual/Preprocessor.html
index d79ad7377..5513d4f91 100644
--- a/Doc/Manual/Preprocessor.html
+++ b/Doc/Manual/Preprocessor.html
@@ -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
diff --git a/Doc/Manual/SWIG.html b/Doc/Manual/SWIG.html
index 95135998b..48c2d9f2b 100644
--- a/Doc/Manual/SWIG.html
+++ b/Doc/Manual/SWIG.html
@@ -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
diff --git a/Doc/Manual/Warnings.html b/Doc/Manual/Warnings.html
index 0b3cb37e9..95af1ec6b 100644
--- a/Doc/Manual/Warnings.html
+++ b/Doc/Manual/Warnings.html
@@ -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>
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index b95c7e33d..03ab789dc 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -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)
diff --git a/Examples/php/pragmas/example.i b/Examples/php/pragmas/example.i
index 289d4ec99..c7e8bf303 100644
--- a/Examples/php/pragmas/example.i
+++ b/Examples/php/pragmas/example.i
@@ -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();"
diff --git a/Lib/allkw.swg b/Lib/allkw.swg
index dec6c7c03..2a2fe18d8 100644
--- a/Lib/allkw.swg
+++ b/Lib/allkw.swg
@@ -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>
diff --git a/Lib/php/phprun.swg b/Lib/php/phprun.swg
index b4e4276f5..5196b95b4 100644
--- a/Lib/php/phprun.swg
+++ b/Lib/php/phprun.swg
@@ -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);
}
diff --git a/Lib/php/typemaps.i b/Lib/php/typemaps.i
index 6c3a25293..7af301d0d 100644
--- a/Lib/php/typemaps.i
+++ b/Lib/php/typemaps.i
@@ -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
diff --git a/Source/Include/swigwarn.h b/Source/Include/swigwarn.h
index da386ee47..e25e4408b 100644
--- a/Source/Include/swigwarn.h
+++ b/Source/Include/swigwarn.h
@@ -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
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index 0b6036669..3ee1154ae 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -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();
}
diff --git a/Source/Modules/swigmain.cxx b/Source/Modules/swigmain.cxx
index 5b103e71e..4208a8c6f 100644
--- a/Source/Modules/swigmain.cxx
+++ b/Source/Modules/swigmain.cxx
@@ -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)"},