Anatol Belski
70de6180d5
fixes to %pd format usage
2014-08-24 02:35:34 +02:00
Anatol Belski
919b996527
ported ext/gmp
2014-08-19 22:10:20 +02:00
Anatol Belski
63d3f0b844
basic macro replacements, all at once
2014-08-19 08:07:31 +02:00
Dmitry Stogov
9eb89dddb1
Use optimized zend_array_dup() function. convert zend_hash_num_elements() and zend_hash_next_free_element() into macros.
2014-05-23 20:37:53 +04:00
Dmitry Stogov
f1720348ca
Fixed access to uninitialized data and attempt to double free
2014-05-13 12:57:42 +04:00
Nikita Popov
4c5b5d7201
Port ext/gmp (one failure)
2014-05-06 19:03:48 +02:00
Stanislav Malyshev
c18ae51aeb
Fix crashes in GMP serialize/unserialize
2014-04-28 01:22:02 -07:00
Anatol Belski
1a624e27a6
restored the old code in 5.4/5 related to bug #66872
...
The crash is reproducable in 5.6+ only, so 5.4 and 5.5 are fine
with the old code.
2014-03-11 11:50:14 +01:00
Pierre Joye
eef2978afc
Merge branch 'PHP-5.5' into PHP-5.6
...
* PHP-5.5:
update NEWS
fix #66872 , invalid argument crashes gmp_testbit
fix #66872 , invalid argument crashes gmp_testbit
add vc12 (2013)
Conflicts:
ext/gmp/gmp.c
2014-03-10 12:18:57 +01:00
Pierre Joye
af41914e15
fix #66872 , invalid argument crashes gmp_testbit
2014-03-10 12:06:40 +01:00
datibbaw
aff56f3c45
add T_POW (**) operator
...
Fixed recognition of the operator
Added opcode, still doing multiply instead of pow()
opcode now always returns int(42)
The right answer, but always a float
Yanked code from pow() implementation.
Should not handle negative long as exponent ourselves
Added test cases from pow()
Moved precedence higher than '~'
Added GMP operator overloading
Added ZEND_ASSIGN_POW (**=) operator.
Added pow() as a language construct.
Adjusted test cases for changed precedence.
Reduced pow() to shell function around ZEND_API pow_function()
Reduced test case to only contain edge cases
Added overloading test case
Moved unary minus above T_POW
Revert "Added pow() as a language construct."
Bad bad bad idea.
This reverts commit f60b98cf7a8371233d800a6faa286ddba4432d02.
Reverted unary minus behaviour due to previous revert.
Convert arrays to int(0)
Exponent with array as a base becomes int(0)
Rebase against master
Fixed tokenizer test case
2014-02-06 14:41:21 +01:00
Xinchen Hui
c081ce628f
Bump year
2014-01-03 11:08:10 +08:00
Xinchen Hui
c0d060f5c0
Bump year
2014-01-03 11:04:26 +08:00
Nikita Popov
5408f1e5a6
Throw warning when converting invalid string to GMP
2013-12-30 14:38:09 +01:00
Nikita Popov
00c74ccf69
Support gmp_remroot() on GMP 4.1
2013-12-02 20:11:06 +01:00
Nikita Popov
f54f308f71
Clean up GMP arginfos
...
Removed duplicate arginfos, specified number of required args
everywhere and removed weird pass-by-ref arguments.
2013-11-29 00:05:28 +01:00
Nikita Popov
6d38090c8d
Add gmp_root() and gmp_rootrem() functions
2013-11-29 00:01:59 +01:00
Nikita Popov
1c8cbe4b4e
Use class handlers for GMP serialization
...
A bit faster and less boilerplate
2013-11-29 00:01:59 +01:00
Nikita Popov
8860758a74
Remove duplicate / commented code in GMP
2013-11-29 00:01:59 +01:00
Nikita Popov
4218e89f8d
Fix bug #65997 by switching to Serializable for GMP
...
Rather than using get_properties and __wakeup for serialization
the code now uses Serializable::serialize() and
Serializable::unserialize(). The get_properties handler is switched
to a get_debug_info handler. Thus get_gc will now return only
the normal properties and not do any modifications, thus fixing
the leak. This also avoids a $num property from being publicly
visible after the object was dumped or serialized, so that's an
extra plus.
2013-10-29 20:58:30 +01:00
Nikita Popov
647e0be64b
Fix compile warning in GMP
2013-10-29 20:07:34 +01:00
Christopher Jones
3c166c4758
Merge branch 'PHP-5.5'
...
* PHP-5.5:
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
Conflicts:
ext/gmp/gmp.c
2013-08-14 20:47:00 -07:00
Christopher Jones
9ad97cd489
Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
2013-08-14 20:36:50 -07:00
Felipe Pena
281936b295
- Fixed bug #65227 (Memory leak in gmp_cmp second parameter)
2013-07-12 20:23:00 -03:00
Nikita Popov
7713b8c2ac
GMP improvements
...
As per RFC https://wiki.php.net/rfc/operator_overloading_gmp
2013-06-17 17:59:12 +02:00
Xinchen Hui
a666285bc2
Happy New Year
2013-01-01 16:37:09 +08:00
Xinchen Hui
0a7395e009
Happy New Year
2013-01-01 16:28:54 +08:00
Felipe Pena
8775a37559
- Year++
2012-01-01 13:15:04 +00:00
Felipe Pena
4e19825281
- Year++
2012-01-01 13:15:04 +00:00
Felipe Pena
4b30846b50
- Make usage of new PHP_FE_END macro
2011-07-25 11:35:02 +00:00
Felipe Pena
da376383e8
- Make usage of new PHP_FE_END macro
2011-07-25 11:35:02 +00:00
Felipe Pena
0203cc3d44
- Year++
2011-01-01 02:17:06 +00:00
Ilia Alshanetsky
051145f62a
Removed unused variable
2010-10-25 16:38:19 +00:00
Stanislav Malyshev
d3b1ab9b20
Fix bug #52906 gmp_mod returns negative result when non-negative is expected
2010-10-01 00:12:23 +00:00
Antony Dovgal
4bf895cb08
fix ZTS build
2010-09-17 07:07:52 +00:00
Adam Harvey
767bc20ed5
Fix bug #52849 (GNU MP invalid version match).
2010-09-15 10:51:55 +00:00
Pierre Joye
5cbece0a8e
- fix build when __GMP_BITS_PER_MP_LIMB is not defined but GMP_LIMB_BITS (no trace of this change in gmp's changelog...)
2010-02-23 11:07:39 +00:00
Sebastian Bergmann
9ba1e81665
sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php
2010-01-03 09:23:27 +00:00
Pierre Joye
7179910573
- [DOC] expose MPIR version when mpir is used instead of gmp
2009-12-10 02:25:47 +00:00
David Soria Parra
7957efe4d4
Use extended base if we build again gmp 4.2.0 which is usually available.
2009-11-27 22:24:44 +00:00
David Soria Parra
99c43e1b93
Also allow base 62 for gmp_init as requested in ( #50283 )
2009-11-25 23:38:34 +00:00
David Soria Parra
579a6e39de
Really use 62 as the upper boundary as requested and not 32.
2009-11-25 18:15:25 +00:00
David Soria Parra
18f32db810
Implement feature request #50283 (allow base in gmp_strval to use full range: 2 to 62, and -2 to -36)
2009-11-24 13:33:35 +00:00
Sebastian Bergmann
08659c2dcd
MFH: Bump copyright year, 3 of 3.
2008-12-31 11:15:49 +00:00
Felipe Pena
fc2fb50d09
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-11-17 11:28:01 +00:00
Felipe Pena
7a37fa2d6b
- Revert ZEND_BEGIN_ARG_INFO change
2008-11-02 21:19:39 +00:00
Felipe Pena
df10005563
- MFH: Added 'static' into ZEND_BEGIN_ARG_INFO_EX macro
2008-10-24 14:35:40 +00:00
Ilia Alshanetsky
92ebb2e282
Fixed bug #43981 (gmp_div_r() does not preserve the sign of 1st argument)
2008-01-30 18:25:51 +00:00
Sebastian Bergmann
d1dded8751
MFH: Bump copyright year, 2 of 2.
2007-12-31 07:17:19 +00:00
Stanislav Malyshev
ec4d9f3387
fix 64-bit
2007-11-01 20:25:11 +00:00