Commit graph

95 commits

Author SHA1 Message Date
William S Fulton
5d8d045c1f fix #1934695 Getattr(n, wrap:name) assertion
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10351 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-04-05 20:53:23 +00:00
William S Fulton
b67e0a28a3 Fixes for $wrapname to work in %exception
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10265 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-25 22:07:28 +00:00
Olly Betts
8dabd96606 PHP4 reaches EOL at the end of 2007, so remove PHP4 specific entry from the
todo list.  Tweak message about lack of multiple inheritance to say "PHP"
rather than "Php4".


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10174 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-28 00:46:53 +00:00
William S Fulton
39abd80eef Changes to compile with VC++6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-10 21:10:17 +00:00
Olly Betts
ece41d9c9f [php] Fix makefile generated by -make (SF#1633679). Update
documentation to mark "-make" as deprecated (none of the other
SWIG backends seem to offer such a feature, it can't realistically
generate a fully portable makefile, and the commands to build an
extension are easy enough to write for the user's preferred build
tool).  Also recommend against the use of "-phpfull" (it's only
really useful when static linking, and a dynamically loadable
module is virtually always the better approach).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-10 00:59:02 +00:00
William S Fulton
fe042d2ebc Replace cvs $Header$ with svn $Id$
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:42:11 +00:00
Olly Betts
a1ae35b43f Revert this fix unless ZEND_RAW_FENTRY is defined (it was added in
PHP 5.2.<something>):

    [PHP] Fix many occurrences of "warning: deprecated conversion from
    string constant to 'char*'" from GCC 4.2 in generated C/C++ code.

Use zend_function_entry rather than function_entry in generated code.
The later only exists for compatibility with PHP3!


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9997 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 17:25:15 +00:00
Olly Betts
1b1334815c [PHP] Fix many occurrences of "warning: deprecated conversion from
string constant to 'char*'" from GCC 4.2 in generated C/C++ code.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9992 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-16 21:39:37 +00:00
William S Fulton
ad1a72f834 Remove incorrect license in generated code. See swig-devel mailing 'licence issue' thread
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9986 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-12 21:44:18 +00:00
Olly Betts
2fffdd118a [php] Fix long-standing memory leak in wrapped constructors and
wrapped functions/methods which return an object.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9969 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-09 18:12:42 +00:00
Olly Betts
f66899a3bd Can't use (double) cast in PHP default value, so rework.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9916 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-25 16:03:24 +00:00
Olly Betts
437bc4d61e [PHP5] Fix handling of double or float parameters with an integer default value.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9914 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-25 13:53:27 +00:00
Olly Betts
e59dbf74f2 [PHP5] Generate __isset() methods for setters for PHP 5.1 and later.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9913 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-25 13:11:25 +00:00
Olly Betts
9b851f3f55 Eliminate unused parameters on calls to Printf()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9912 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-25 13:05:44 +00:00
John Lenz
fb51964d01 Fix a bunch of minor bugs found by Coverity scanner
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-10 02:55:27 +00:00
Olly Betts
e72b6e8ff0 [PHP5]
Fix handling of a particular case involving overloaded functions
with default parameters.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-06 00:57:32 +00:00
Olly Betts
dc61936359 [PHP5]
Fix wrapping of methods and functions which return a pointer to a
class (bug#1700788) and those which have overloaded forms returning
both classes and non-classes (bug#1712717, thanks to Simon
Berthiaume for the patch).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-26 11:38:18 +00:00
Olly Betts
2632bd0c3c Stop passing unused argument to Printf().
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9672 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-15 23:22:29 +00:00
Olly Betts
8b9af6389b [PHP5] If ZTS is enabled, release <module>_globals_id in MSHUTDOWN
to avoid PHP interpreter crash on shutdown.  This solution was
suggested here: http://bugs.php.net/bug.php?id=40985


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9670 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-04 09:40:55 +00:00
Olly Betts
a5ac23e6d2 [PHP4] Add missing ZTS annotations to generated C++ wrapper code
to fix compilation failures when using ZTS enabled SWIG (Linux
distributions tend to disable ZTS, but notably the Windows build
uses it by default).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9669 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-03 15:56:36 +00:00
Olly Betts
438195cfe9 [PHP5] When we know the literal numeric value for a constant, use
that to initialise the const member in the PHP wrapper class.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9651 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-03-03 15:38:52 +00:00
Olly Betts
a63013152c [PHP5] Fix PHP wrapper code generated for certain cases of
overloaded forms with default arguments.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9650 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-03-02 19:05:45 +00:00
Olly Betts
8b334887e4 Fix generated makefile rule for building the module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9647 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-02-07 10:19:35 +00:00
William S Fulton
9f88801914 add support for newfree typemaps in php module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-12 23:41:49 +00:00
Dave Beazley
c12550e4ad API cleanup. Documentation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 05:23:20 +00:00
Dave Beazley
264b7dff90 API cleanup. Documentation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-30 18:27:47 +00:00
Olly Betts
4f7099cb56 Fix bug #1613673 (bad PHP5 code generated for getters and setters).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9613 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-12-14 02:15:58 +00:00
William S Fulton
aa04c4c057 beautify/format source code with gnu indent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-01 23:54:54 +00:00
Olly Betts
d02caa7a28 Fix bug which effectively double-Delete()-ed a String *.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9428 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-10 19:32:33 +00:00
Olly Betts
61b1372996 Covert a stderr message to a proper SWIG warning.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-06 11:08:28 +00:00
Olly Betts
110a537445 Clean up the old disabled "script accessible destructor" code. I don't think
we'll want it again, but if we do we can retrieve it from CVS.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-06 10:30:44 +00:00
Olly Betts
2788a39211 Eliminate $ext in the generated php wrapper (namespace pollution bad!)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9408 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 15:53:07 +00:00
Olly Betts
122b0cbd04 The wrapper function filtering should only happen for -php4 without -noproxy.
Further simplify the property getter/setter code.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9407 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 13:54:39 +00:00
Olly Betts
1b89128bf5 Remove some dead code; tidy up some formatting.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9397 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 04:52:51 +00:00
Olly Betts
25636f132f Tidy up descriptions of destructors.
Fix comments for handles for simple types.

Omit superfluous "else" when generating property getter and setter handling
code, which produces smaller generated source code, and simplifies the
generating code.

With -php5, if -prefix isn't specified, don't prefix classes.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9389 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-03 16:58:16 +00:00
Olly Betts
ec5c4bc6f8 More fixes for double generation of methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9385 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-02 19:05:55 +00:00
Olly Betts
ad6f144dc9 Sort out double generation of methods in the proxy case.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9384 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-02 07:57:56 +00:00
Olly Betts
7f2a849617 Revert the "automatic -noproxy for C code" change (for now at least) - the
testsuite contains examples with proxy classes for C code, so it's not as
obviously correct a change as I had thought.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9307 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-20 11:00:51 +00:00
Olly Betts
9eb77c5800 Previously -noproxy was required when wrapping some C code
to avoid SWIG generating new_XXX methods.  Now proxy classes are
only ever enabled when wrapping C++ code.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9302 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-20 05:32:22 +00:00
Olly Betts
0915d45c2c Use NewStringEmpty() rather than NewString("").
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9300 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-20 02:00:42 +00:00
Olly Betts
44eaee3a01 Apply patch from SF bug: [ 1466086 ] PHP namespace clash - ErrorCode
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9262 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-05 16:18:01 +00:00
Olly Betts
b42168cf6e [php] Move constant initialisation from RINIT to MINIT to fix a
warning when using Apache and mod_php.  We only need to create
PHP constants once when we're first initialised, not for every HTTP
request.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9260 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-29 02:29:16 +00:00
Olly Betts
afa9552b5c Fix the easiest warnings in the generated code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9212 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-11 04:53:33 +00:00
William S Fulton
d9d1a7d5c4 ensure $symname is suitably expanded
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-05 21:26:10 +00:00
William S Fulton
a9d5f49c4a fix compiler warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9181 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-06-29 22:03:56 +00:00
Olly Betts
546723d379 New PHP5 OO wrapper generation code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9169 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-06-19 03:21:23 +00:00
Olly Betts
68e04737ed Don't segfault if PHP Null is passed as this pointer (e.g.
Class_method(Null)) - give a PHP Error instead.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9166 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-06-17 01:33:17 +00:00
Olly Betts
7808da6cd2 Eliminate use of static fixed sized buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9132 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-25 08:01:36 +00:00
Olly Betts
b4b814dd26 Make GCC visibility support work with PHP.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9129 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-20 12:59:06 +00:00
Olly Betts
8a9da3c42e Removed support for -dlname (use -module instead). Fixed
naming of PHP extension module to be consistent with PHP
conventions (no "php_" prefix on Unix; on PHP >= 4.3.0, handle Unix
platforms which use something other than ".so" as the extension.)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9125 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-19 05:43:26 +00:00