Olly Betts
e0cffb81dd
Eliminate SWIG_classWrapper property
...
Instead set the _cPtr property to PHP NULL to signal that this object
uses swig_object_wrapper.
2021-04-01 15:10:10 +13:00
Olly Betts
c467a66668
Remove debug code
2021-04-01 14:40:32 +13:00
Olly Betts
5838f10aa0
wrap fake class constants via C API
2021-04-01 14:40:32 +13:00
Olly Betts
43457690ac
Eliminate another global variable
2021-03-31 11:10:34 +13:00
Olly Betts
46ef0eb9a1
Fix value of $source typemap parameter
...
This is only present for ancient compatibility so nothing actually
tests it works.
2021-03-31 10:57:34 +13:00
Olly Betts
3b1cc00566
Eliminate 3 List variables
...
Rather than building up lists of classes and details about them to
generate from at the end, just generate into a new String variable as we
go along.
2021-03-31 10:55:26 +13:00
Olly Betts
d24e09c57d
Remove now-unused variables and code to set them
2021-03-31 05:02:13 +13:00
Olly Betts
904f5a65d8
Merge branch 'master' into gsoc2017-php7-classes-via-c-api
2021-03-31 04:53:40 +13: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
2392f6146a
Remove variables which are set but never used
2021-03-31 04:39:18 +13:00
Olly Betts
8cd98ec74e
Eliminate use of fn in testcases
...
Fix cpp11_lambda_functions and rname to use fn1 instead of fn, since
fn is a reserved word as of PHP 7.4.
2021-03-30 11:01:51 +13:00
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