Commit Graph

55 Commits

Author SHA1 Message Date
Olly Betts 07f3637f06 [PHP] Remove useless shadowed variable in example 2022-02-03 23:04:58 +13:00
Olly Betts f2009ef681 Fix and restore disabled code in PHP value example 2021-05-04 14:21:13 +12:00
Olly Betts 32283991c5 Don't generate a .php wrapper file by default
It's now only generated if something to put in it is specified via:

%pragma(php) include=...

or

%pragma(php) code=...
2021-05-04 14:14:56 +12:00
Olly Betts 09d06843d1 Fix PHP sync example
Mostly it was missing `%include <std_string.i>`
2021-04-19 11:26:32 +12:00
Olly Betts a49cc60772 Adjust PHP sync example
Make it work with how globals are actually wrapped.  It looks like
this example has never been right, but nobody noticed before PHP 8
started warning about the use of unset variables.

This reveals that handling of std::string properties needs fixing.
2021-04-18 10:00:34 +12:00
Olly Betts c9d64f0bed php: Test multiple return values in pointer example 2021-03-31 04:49:38 +13:00
Olly Betts 1eab01ad1f Fix comment typo 2021-03-31 04:46:32 +13:00
Olly Betts c78325a82a php: Remove out-dated remark from funcptr example
The function pointers are wrapped as resources not "swig style string
pointers".
2021-03-26 08:24:12 +13:00
Olly Betts eb8024f18b php: Use qualified constant names in funcptr example 2021-03-26 08:24:12 +13:00
Olly Betts e54d44c4be php: Omit closing ?> in manual and examples
PSR-12 says "The closing ?> tag MUST be omitted from files containing
only PHP".
2021-03-23 11:47:19 +13:00
William S Fulton 3ccc904b06 Fix php pragmas example include path
Was not working for out of source builds
2019-05-09 07:35:24 +01:00
William S Fulton dbb5fdda01 Fix php pragmas example
. is not always in the include_path by default
2019-04-30 23:44:41 +01:00
Olly Betts ebc9e6ad9f [php] Eliminate use of unset constants in example
This generates a warning with PHP 7.3 which apparently will become
an error in the future.  We're just checking that a constant that
should not be define indeed isn't, which we can achieve more
cleanly using get_defined_constants() instead.
2019-02-08 14:57:53 +13:00
luz.paz 60dfa31a67 Misc. typos
found via `codespell` and `grep`
2018-05-17 10:04:23 -04:00
Nihal 717ef91b90 Remove -noproxy support in the Examples of PHP7 2017-06-27 16:32:44 +12:00
Nihal 74fa7d00e2 Fix indentation in PHP7 and PHP5 variables example 2017-06-26 15:36:55 +12:00
Nihal 21108781a7 Add documentation and examples for php version pragma.
Pragma version to specify versions for PHP5 and PHP7 extensions.
See issue #360.
2017-05-08 12:02:53 +05:30
Olly Betts bb98147965 Remove 'static' targets from PHP examples
The machinery these targets need to work no longer exists, and as
far as I can make out was removed before the code was put under
version control.
2016-11-30 12:15:42 +13:00
William S Fulton 8e2bc595c6 Remove use of preinst-swig script
Complete the prototype removal in ca1431.

The script prevents SWIGTOOL=gdb from working as gdb can't be used to
debug a shell script, it requires a binary.

Add support for SWIGTOOL in all the examples.

SWIG_LIB_DIR and SWIGEXE must now instead be set by all Makefiles.

See issue #473.
2015-08-21 22:43:17 +01:00
William S Fulton b4c441f62e Remove unused std_string.i from callback examples 2015-05-10 11:49:28 +01:00
Olly Betts ac1f067ce9 Eliminate trivial differences between the reference examples 2014-11-07 15:34:43 +13:00
Olly Betts 37cd1474b5 Remove bogus ; after } in examples 2014-11-07 15:34:43 +13:00
William S Fulton f39ed94419 Fix compiler warnings in examples when using -std=c++98 -std=gnu89 -pedantic -Wreturn-type 2014-05-24 13:13:32 +01:00
Karl Wette f574a34155 Allow examples and test-suite to be built out of source tree
- Examples/Makefile.in rules use SRCDIR as the relative source directory

- ./config.status replicates Examples/ source directory tree in build
  directory, and copies each Makefile to build directory, prefixed with
  a header which sets SRCDIR to source directory

- Examples/test-suite/.../Makefile.in set SRCDIR from Autoconf-set srcdir

- Examples/test-suite/errors/Makefile.in needs to filter out source
  directory from SWIG error messages

- Lua: embedded interpreters are passed location of run-time test

- Python: copy run-time scripts to build directory because of 2to3
  conversion; import_packages example copies __init__.py from source
  directory; test-suite sets SCRIPTDIR to location of run-time tests

- Javascript: binding.gyp renamed to binding.gyp.in so that $srcdir
  can be substituted with SRCDIR; removed './' from require() statements
  so that NODE_PATH can be used to point Node.js to build directory
2014-05-11 23:21:10 +02:00
Karl Wette 3aacde4f5f Whitespace cleanup of Example Makefiles 2014-04-16 12:06:02 +02:00
Olly Betts 0de4cf13a8 Further cleaning up of class examples 2014-02-24 10:10:24 +13:00
Olly Betts 34c97ffdbd Improve the class example for several languages.
Fix numerous inaccuracies in index.html (where it exists) and eliminate
unnecessary differences between the example code being wrapped.
2014-02-23 18:24:51 +13:00
William S Fulton 8e6a539d89 Fix crash in php example
Declaration and definition of the add function were different
2014-02-15 19:34:42 +00:00
Olly Betts d67aed42bd Remove executable bit from various test-suite runme files 2014-01-06 15:41:06 +13:00
Miklos Vajna 227192f80a Fix Examples/php/pointer to work with PHP 5.5
With this, all examples work with PHP 5.5 for me.
2013-12-12 15:52:51 +13:00
William S Fulton 152905e193 Fix gcc -Waddress warning in variables examples 2013-10-18 06:53:02 +01:00
William S Fulton 0fa791d1ea PHP examples makefiles clean target fixed and use RUNPIPE and tidyup 2013-04-19 22:47:26 +01:00
Olly Betts 481ed3c578 Update lingering configure.in references to say configure.ac 2013-03-21 14:41:09 +13:00
William S Fulton 87ee6da365 Make php example C90 compliant
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13974 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-15 23:56:27 +00:00
William S Fulton a0b869da38 Remove runtime warnings in overloading php example
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 19:58:44 +00:00
Olly Betts a25ccbf58b [PHP] Fix handling of OUTPUT typemaps (Patch from Ryan in SF#3058394).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12208 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-08 02:40:56 +00:00
Olly Betts 09c9bf881d Remove PHP4 hangover
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12073 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-01 06:29:16 +00:00
Olly Betts 4144eaa214 Remove PHP4 hangover.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12072 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-01 06:24:48 +00:00
Olly Betts ae8ac072da Fix to work with PHP5 wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12048 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 06:25:28 +00:00
Olly Betts 744bfd6118 Fix to work with PHP5 wrappers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12047 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 06:24:03 +00:00
Olly Betts dc33d167bf Fix to work with PHP5 wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12046 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-25 06:08:08 +00:00
Olly Betts 3a0e056d63 Fix typo in literal string.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11785 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-12-15 14:29:03 +00:00
Olly Betts af6c65c7e6 Add callback and extend; fix error in alphabetical ordering.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11607 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:41:16 +00:00
Olly Betts ea560a73a4 Rename back - William wants this consistent across all the languages and it's
too much work to test a global renaming.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11606 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:37:18 +00:00
Olly Betts c8f64ccc2e Explain the poor name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:34:26 +00:00
Olly Betts c9635d6255 Remove bogus stuff about memory leaks - nothing in this testcase leaks.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:30:42 +00:00
Olly Betts 089b226b80 Rename the "extend" example to "directors" as it tests directors not %extend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11603 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:27:31 +00:00
Olly Betts 3141dfd599 Convert to use proxy classes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11601 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-17 01:08:23 +00:00
Olly Betts 1b42d9dde1 [PHP] Update the PHP "class" example to work with PHP5 and use
modern wrapping features.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11565 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-14 09:01:31 +00:00
Miklos Vajna 0249eea389 Merge https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-vmiklos/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11434 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-22 11:08:29 +00:00