summaryrefslogtreecommitdiff
path: root/ext/com_dotnet
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Include stub hash in generated arginfo filesNikita Popov2020-06-242-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hash is used to check whether the arginfo file needs to be regenerated. PHP-Parser will only be downloaded if this is actually necessary. This ensures that release artifacts will never try to regenerate stubs and thus fetch PHP-Parser, as long as you do not modify any files. Closes GH-5739.
* | | Constify char * arguments of APIstwosee2020-06-083-4/+4
| | | | | | | | | | | | Closes GH-5676.
* | | Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* | | Implement #47074: phpinfo() reports "On" as 1 for the some extensionsChristoph M. Becker2020-06-041-3/+3
| | | | | | | | | | | | What is modified as boolean, should also be displayed as boolean.
* | | Fix other typos in param name/code commentsTyson Andre2020-05-011-1/+1
| | | | | | | | | | | | Closes GH-5502
* | | Code tweaks: Remove unneeded semicolonsAlex Dowad2020-04-291-1/+1
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-161-0/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Move test to its folder
| * | Move test to its folderGabriel Caruso2020-04-161-0/+0
| | |
* | | Remove XFAIL section of a passing COM testGeorge Peter Banyard2020-04-141-14/+0
| | | | | | | | | | | | Closes GH-5297
* | | Generate method entries from stubs for a couple of extensionsMáté Kocsis2020-04-113-27/+39
| | | | | | | | | | | | Closes GH-5368
* | | Fix typo (UNKOWN -> UNKNOWN)Christoph M. Becker2020-04-092-2/+2
| | |
* | | Store default parameter values of internal functions in arg infoMáté Kocsis2020-04-082-14/+14
| | | | | | | | | | | | | | | | | | | | | Closes GH-5353. From now on, PHP will have reflection information about default values of parameters of internal functions. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
* | | Clean up constructor handling in com_dotnetChristoph M. Becker2020-04-069-123/+149
| | | | | | | | | | | | | | | | | | We substitute the construction magic with standard constructors, move the ZPP checks to the beginning of the ctors, and also let the function entries be generated from the stubs.
* | | Verify that all stubs have a return typeNikita Popov2020-04-032-4/+4
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-261-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Add missing 'skip' to bug79332.phpt skip message
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-261-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Add missing 'skip' to bug79332.phpt skip message
| | * Add missing 'skip' to bug79332.phpt skip messageLukas Berger2020-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The skip message must start with the word 'skip', otherwise the test will not be skipped. *Before:* Running selected tests. TEST 1/1 [ext/com_dotnet/tests/bug79332.phpt] ========DIFF======== 001+ Fatal error: Uncaught Error: Class 'COMPersistHelper' not found in /srv/php/ext/com_dotnet/tests/bug79332.php:2 001- A com_exception has been thrown 002+ Stack trace: 003+ #0 {main} 004+ thrown in /srv/php/ext/com_dotnet/tests/bug79332.php on line 2 ========DONE======== FAIL Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] *After:* Running selected tests. SKIP Bug #79332 (php_istreams are never freed) [ext/com_dotnet/tests/bug79332.phpt] reason: com_dotnet extension not available
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-021-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79333: com_print_typeinfo() leaks memory
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-021-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79333: com_print_typeinfo() leaks memory
| | * Fix #79333: com_print_typeinfo() leaks memoryChristoph M. Becker2020-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We have to free the `ansiname`s, regardless of whether they have been put into the hashtable or not. Since bug79299.phpt already shows the leak when run with a leak checker, there is no need for another regression test.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-03-022-10/+19
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79332: php_istreams are never freed
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-03-022-10/+19
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79332: php_istreams are never freed
| | * Fix #79332: php_istreams are never freedChristoph M. Becker2020-03-022-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Releasing the `com_dotnet_istream_wrapper` in `istream_destructor()` is pointless, since `istream_destructor()` is only called when the resource is going to be released. This recursion is not a real issue, though, since the resource is never exposed to userland, and has at most refcount 1, so due to well defined unsigned integer underflow, it never is released twice. However, returning early in this case causes a memory leak which needs to be fixed.
* | | Add stubs for COMPersistHelperNikita Popov2020-02-263-19/+82
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-232-1/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79299: com_print_typeinfo prints duplicate variables
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-232-1/+21
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79299: com_print_typeinfo prints duplicate variables
| | * Fix #79299: com_print_typeinfo prints duplicate variablesChristoph M. Becker2020-02-232-1/+21
| | | | | | | | | | | | | | | | | | | | | `lastid` has to retain its value during the traversal, so we move it to an outer scope. Patch contributed by Litiano Moura.
* | | Remove the deprecated reflection export methodsMáté Kocsis2020-02-191-1/+2
| | | | | | | | | | | | Closes GH-5188
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-082-1/+17
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79248: Traversing empty VT_ARRAY throws com_exception
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-082-1/+17
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79248: Traversing empty VT_ARRAY throws com_exception
| | * Fix #79248: Traversing empty VT_ARRAY throws com_exceptionChristoph M. Becker2020-02-082-1/+17
| | | | | | | | | | | | | | | | | | If the `VT_ARRAY` is empty, i.e. its upperbound is less than its lower bound, we must not call `php_com_safearray_get_elem()`, because that function throws in this case.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-082-1/+21
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79247: Garbage collecting variant objects segfaults
| * | Fix #79247: Garbage collecting variant objects segfaultsChristoph M. Becker2020-02-082-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | variant objects have no (declared) properties, so the `get_properties` handlers returns a pointer to constant storage for efficiency reasons. This pointer must not be returned from the `get_gc` handler, though; instead we set up an own `get_gc` handler and return NULL from it, to signal that there are no properties to collect.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-071-1/+3
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Skip test case on x86 where it otherwise fails [ci skip]
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-071-1/+3
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Skip test case on x86 where it otherwise fails [ci skip]
| | * Skip test case on x86 where it otherwise fails [ci skip]Christoph M. Becker2020-02-071-1/+3
| | | | | | | | | | | | | | | `-2200000000` can't be converted to integer on x86, so the constructor call would fail.
* | | Simplify COM_ERR_CONST definition for x64Christoph M. Becker2020-02-071-5/+1
| | | | | | | | | | | | This is also a wee bit faster.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-072-1/+27
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79242: COM error constants don't match com_exception codes
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-072-1/+27
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79242: COM error constants don't match com_exception codes
| | * Fix #79242: COM error constants don't match com_exception codesChristoph M. Becker2020-02-072-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because a `HRESULT` is a `LONG`[1], no special treatment is required on x86 platforms to get appropriate values. On x64 platforms we prefer positive values, what we could accomplish by casting the `HRESULT` value to `ULONG` and then to `zend_long`, but since the current behavior is correct and the performance improvement is negligible, we defer that to master. [1] <https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#hresult>
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-02-062-1/+25
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #66322: COMPersistHelper::SaveToFile can save to wrong location
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-02-062-1/+25
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #66322: COMPersistHelper::SaveToFile can save to wrong location
| | * Fix #66322: COMPersistHelper::SaveToFile can save to wrong locationChristoph M. Becker2020-02-062-1/+25
| | | | | | | | | | | | | | | Saving under the given `filename` may also work, but since `::LoadFromFile` uses the `fullpath` we follow suit.
* | | Reindent phpt filesNikita Popov2020-02-038-92/+92
| | |
* | | Make error messages more consistent by fixing capitalizationMáté Kocsis2020-01-171-1/+1
| | | | | | | | | | | | Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
* | | Use proper printf() specifiersChristoph M. Becker2020-01-151-1/+1
| | |
* | | Use RETURN_THROWS() in various placesMáté Kocsis2020-01-034-22/+22
| | |
* | | Use RETURN_THROWS() during ZPP in bz2, calendar, com_dotnet extensionsMáté Kocsis2019-12-314-19/+19
| | |
* | | Add union return types for function stubsMáté Kocsis2019-11-112-3/+2
| | |
* | | Make zend_type a 2-field structNikita Popov2019-11-082-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now store the pointer payload and the type mask separately. This is in preparation for union types, where we will be using both at the same time. To avoid increasing the size of arginfo structures, the pass_by_reference and is_variadic fields are now stored as part of the type_mask (8-bit are reserved for custom use). Different types of pointer payloads are distinguished based on bits in the type_mask.