Olly Betts
49d923b917
php: Fix director_overload_runme.php printing empty line
2021-03-30 10:56:23 +13:00
Olly Betts
c863ca8b1f
Use zstring access macros
...
These are likely to be more future-proof than accessing struct members
directly.
2021-03-29 18:18:37 +13:00
Olly Betts
f56d8ce103
Fix memory leak in director upcall check
2021-03-29 18:17:19 +13:00
Olly Betts
5482a02dd4
Fix handling of strongly-typed enums
...
Testcase cpp11_strongly_typed_enumerations.cpptest now passes.
2021-03-29 17:53:05 +13:00
Olly Betts
5156ad4f7b
Remove unnecessary NULL check
...
SWIG_remove() calls either free() or delete, both of which handle
a NULL pointer.
2021-03-29 17:45:03 +13:00
Olly Betts
979d48b0b4
Remove obsolete FIXME
...
We no longer have the PHP code wrappers.
2021-03-29 17:41:01 +13:00
Olly Betts
3f1286ba4f
Use standard SWIG overload dispatch
...
Instead of having a slightly modified PHP-specific variant of
Swig_overload_dispatch we now advance the ParmList over the this
pointer.
2021-03-29 17:41:01 +13:00
Olly Betts
7142acbf93
Fix whitespace oddities
2021-03-29 17:29:59 +13:00
Olly Betts
0e7d6a4c8d
More PHP8 compatibility fixes
2021-03-29 09:37:44 +13:00
Olly Betts
73a149200f
Remove more code which is no longer used
2021-03-28 19:47:16 +13:00
Olly Betts
4b055c343d
Fix compatibility with PHP8
2021-03-28 19:46:51 +13:00
Olly Betts
1c5573d0d0
Remove code which is no longer used
2021-03-28 08:54:24 +13:00
Olly Betts
b45bd65dbc
Add compatibility for PHP 7.3 and earlier
2021-03-28 06:58:46 +13:00
Olly Betts
c58149bc45
Simplify printing code a little
...
Remove unused Printf parameter, and use Printv where it's more readable.
2021-03-27 19:59:30 +13:00
Olly Betts
dfa5353f27
Eliminate extras hash table
...
This was used to store custom properties, but we can just ask the PHP
object to store them like it normally would, after checking for our
custom pseudo-properties.
2021-03-27 19:57:37 +13:00
Olly Betts
799cb68a8a
Use ZEND_THIS instead of getThis()
...
getThis(z) checks that z is a PHP object and returns ZEND_THIS if it
is, and NULL otherwise. In all our uses we know that z is a PHP object
(and we'd try to dereference NULL if it were returned!)
2021-03-27 19:51:24 +13:00
Olly Betts
232308b494
Drop unnecessary casts to swig_object_wrapper*
2021-03-27 19:49:49 +13:00
William S Fulton
7dc042b756
Merge branch '1-pip-swig'
...
Python deployment scripts tidy up
* 1-pip-swig:
Create utils.py
Update mkrelease.py
Update mkdist.py
removed destructuring operator for backward compatibililty
cleanup
changed os system calls to subprocess calls
cmd exec using subprocess rather than system calls
2021-03-26 23:43:55 +00:00
Olly Betts
c79b0a4f3b
[ci] Only test PHP
2021-03-26 17:17:10 +13:00
Olly Betts
c03679acef
Improve how we allocate swig_object_wrapper
...
Use zend_object_alloc() and put the zend_object member last so that
Zend can put object properties after it.
2021-03-26 17:15:34 +13:00
Olly Betts
d87b3fb745
Add FIXME comment
...
This looks to be the reason why testcases overload_null and
overload_polymorphic are failing.
2021-03-26 16:45:14 +13:00
Olly Betts
0da436aa83
Simplify assignment
2021-03-26 16:41:39 +13:00
Olly Betts
478bdcdfbf
Whitespace tweaks
2021-03-26 16:41:28 +13:00
Olly Betts
4aff93942a
Improve arginfo generation
...
Fixes some failing examples and testcases.
2021-03-26 15:34:29 +13:00
Olly Betts
f77113ea71
php: Eliminate SWIG_ZEND_NAMED_FE
...
It existed to work around const-correctness issues in older versions of
PHP's C API. It's conceivable user code might be using it, but unlikely
and the switch to creating classes via the API is a natural time for a
compatibility break.
2021-03-26 13:58:02 +13:00
Olly Betts
2ba0f82720
Merge branch 'master' into gsoc2017-php7-classes-via-c-api
2021-03-26 12:00:59 +13:00
Olly Betts
b840911410
Remove outdated FIXME/TODO from php.cxx
...
See #1529
2021-03-26 11:18:07 +13:00
Olly Betts
3fba8e7daa
php: Trim trailing whitespace from PHP typemaps
2021-03-26 10:19:57 +13:00
Olly Betts
c882f39e3c
[php] Fix misleadingly indented void* in typemap
2021-03-26 10:06:43 +13:00
Olly Betts
76c2c4675b
[PHP] Update PHP keyword list
...
Add PHP keywords 'fn' (added in 7.4) and 'match' (added in 8.0) to the
list SWIG knows to automatically rename.
2021-03-26 08:24:40 +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
Jamie Slome
0fc44beac5
Create utils.py
2021-03-25 06:59:01 +00:00
Jamie Slome
8852a1b6d1
Update mkrelease.py
2021-03-25 06:58:11 +00:00
Jamie Slome
a05fc79310
Update mkdist.py
2021-03-25 06:57:33 +00:00
Olly Betts
8ded9d8dae
Merge branch 'master' into gsoc2017-php7-classes-via-c-api
2021-03-25 17:45:17 +13:00
Olly Betts
d15fe23c5f
Merge branch 'gsoc2017-php7-classes-via-c-api' of https://github.com/nihal95/swig into gsoc2017-php7-classes-via-c-api
2021-03-25 16:25:33 +13:00
William S Fulton
33513d5118
testcase fixes for gcc-9
2021-03-25 16:17:06 +13:00
Olly Betts
704ec59f29
[php] Fix widespread use of bare strings in testsuite
...
These generate warnings with PHP 7.3, which will become errors in a
future version.
2021-03-25 16:17:06 +13:00
Olly Betts
12026c66f1
php: Remove out-dated remark from funcptr example
...
The function pointers are wrapped as resources not "swig style string
pointers".
2021-03-25 13:28:43 +13:00
Olly Betts
a596fd05ed
php: Use qualified constant names in funcptr example
2021-03-25 13:28:11 +13:00
William S Fulton
90cdbee6a6
Python -builtin fix wrapping constructors with varargs
...
Fix compilation error when using -builtin and wrapping varargs in constructors
Closes #1942
2021-03-23 23:57:49 +00:00
Olly Betts
1eee194a88
[php] Fix test failures due to undefined GETSET constant
...
Move the constant into the class - the definition outside the class
doesn't seem to work with PHP 7.3.
2021-03-24 12:16:29 +13:00
Olly Betts
351f981952
[php] Fix SWIG_ZEND_CONSTANT_SET_FLAGS for PHP < 7.3
2021-03-24 12:15:39 +13:00
Olly Betts
9f84ca8a00
[php] Fix function constants for PHP 7.3
...
The code we were generating no longer compiled.
2021-03-24 12:15:39 +13:00
Olly Betts
786efd0ae0
Eliminate irrelevant formatting differences from master
2021-03-24 11:59:25 +13:00
William S Fulton
71709af99a
Show CFLAGS and CXXFLAGS for SWIG executable build
2021-03-23 19:46:00 +00:00
Olly Betts
9df60351e4
Don't pass -q when running CLI PHP in testsuite
...
This suppressed output of HTTP headers with PHP < 4.3, but in more
recent versions it doesn't do anything for CLI PHP.
2021-03-23 11:47:19 +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
00fa844352
Travis non-default C/C++ standards flags tweak
...
When testing on Travis, don't turn off maximum compiler warnings, just
enhance them with the chosen standard. This is now possible since recently
dropping the -ansi flags in the maximum compiler warnings. Effectively
we are now testing the later standards as before but also adding -pedantic.
2021-03-22 22:17:06 +00:00