Skip to content

Commit

Permalink
import Math-BigInt-GMP 1.24 from CPAN
Browse files Browse the repository at this point in the history
git-cpan-module:   Math-BigInt-GMP
git-cpan-version:  1.24
git-cpan-authorid: TELS
git-cpan-file:     authors/id/T/TE/TELS/math/Math-BigInt-GMP-1.24.tar.gz
  • Loading branch information
Tels authored and schwern committed Dec 12, 2009
1 parent 7f2d419 commit 47689c6
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 19 deletions.
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

2007-07-31 v1.24 Tels 5530 tests
* apply patch for warnings about ptr size mismatch under Cygwin (thanx Reini Urban!)
* make it work under 5.6.x again by defining SvUOK() (Thanx Marcus Holland-Moritz
and Reini Urban!)

2007-07-25 v1.23 Tels 5527 tests
* require Math::BigInt 1.87
* fix for _new() (appeared under Cygwin, but possible others, thanx
Expand Down
9 changes: 7 additions & 2 deletions GMP.xs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
#include "XSUB.h"
#include "gmp.h"

/* for Perl prior to v5.7.1 */
#ifndef SvUOK
# define SvUOK(sv) SvIOK_UV(sv)
#endif

/*
Math::BigInt::GMP XS code, loosely based on Math::GMP, a Perl module for
high-speed arbitrary size integer calculations (C) 2000 James H. Turner
Expand All @@ -15,11 +20,11 @@ PROTOTYPES: ENABLE
#define NEW_GMP_MPZ_T_INIT RETVAL = malloc (sizeof(mpz_t)); mpz_init(*RETVAL);
#define GMP_GET_ARG_0 if (sv_derived_from(x, "Math::BigInt::GMP")) {\
IV tmp = SvIV((SV*)SvRV(x));\
TEMP = (mpz_t*) tmp;\
TEMP = INT2PTR(mpz_t*, tmp);\
} else { croak("x is not of type Math::BigInt::GMP"); }
#define GMP_GET_ARG_1 if (sv_derived_from(y, "Math::BigInt::GMP")) {\
IV tmp = SvIV((SV*)SvRV(y));\
TEMP_1 = (mpz_t*) tmp;\
TEMP_1 = INT2PTR(mpz_t*, tmp);\
} else { croak("y is not of type Math::BigInt::GMP"); }
#define GMP_GET_ARGS_0_1 GMP_GET_ARG_0; GMP_GET_ARG_1;

Expand Down
4 changes: 2 additions & 2 deletions META.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Math-BigInt-GMP
author: Tels
version: 1.23
version: 1.24
version_from: lib/Math/BigInt/GMP.pm
license: perl
distribution_type: module
generated_by: Math-BigInt-GMP version 1.23
generated_by: Math-BigInt-GMP version 1.24
installdirs: site
requires:
Math::BigInt: 1.87
Expand Down
24 changes: 12 additions & 12 deletions SIGNATURE
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ not run its Makefile.PL or Build.PL.
Hash: SHA1

SHA1 70d6187d0152848c922dc4360fa6dd3a3dc35c62 BUGS
SHA1 80979328c414230f02fce5dfca6c9e4d34241c93 CHANGES
SHA1 271b61ffaf1918eb85e45c4858226ccfbcb4862a CHANGES
SHA1 dda5ca4f413031e9efcaa1600461d5e2adaa3a40 CREDITS
SHA1 4b1a30ff7e4ccc68689c7d7c602c761ec1a45ea2 GMP.xs
SHA1 c677a382a0301544ac58c83a44e25a8d46b22452 GMP.xs
SHA1 fcb1ead705a964b5555ff355534cbcf8b4c176e5 INSTALL
SHA1 d6a6c30ee6d9ba6b9afab8bbf6a25e1b23c744e0 LICENSE
SHA1 574a4f3bc668e1d2d05c189efa46850bd828c79b MANIFEST
SHA1 3716b684ad7f66e9f75a5cfa0737098b41dc0730 MANIFEST.SKIP
SHA1 62dcb09e46b5d15d7edcdfad6efaa43fe434d0bc META.yml
SHA1 072edad617c9e588799181b23239508d734e8cec META.yml
SHA1 7d63c7c9dfc21bd36110f9874a5a0c5a6c313adf Makefile.PL
SHA1 e9de29b6e5e9a5e446231b5b12b644f6ed2caafc README
SHA1 acf3dd42f0d8a87dd02ef9f5f74b894423ffd4d8 TODO
SHA1 fd48d0d8750eb949e485d8136b5b424fe73e9775 build/README
SHA1 7bcc4113830721ad6e37a1ea79df94a6987c836d build/leak.pl
SHA1 ac25bda8a6eb9058a9e42a8943c3e11b9fed88dc build/leaktest
SHA1 7d203448483a48fbc7626ace8d33a7c66aff102d lib/Math/BigInt/GMP.pm
SHA1 ff5fe9462852f64ddadd111b3a12a74a19c84f5c lib/Math/BigInt/GMP.pm
SHA1 b389295c7eb542fb89f55d37390a35ac582b5e6c t/bigfltpm.inc
SHA1 a6659404498c1d7b74e055769710e00bf425e355 t/bigfltpm.t
SHA1 0f8838bf47e9c21a95bc15db11f435836440525c t/bigintg.t
Expand All @@ -39,15 +39,15 @@ SHA1 b68535cf9a33efa949c80b166302a866fd13cff9 t/biglog.t
SHA1 7eda06bd6d27b4092ab7266b1659e3a6ed369b26 t/bigroot.t
SHA1 17935f6d2607dfd441f6f59d69d5aaf282a16bfc t/pod.t
SHA1 c7406b64a2eff28ca33248f647eee3199deb10dc t/pod_cov.t
SHA1 f7aad87c0a30330d474f4fb45f6d1953d6701d2f typemap
SHA1 af431c9de0cf037af2118a77c7110655fa3f427f typemap
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQEVAwUBRqeTaXcLPEOTuEwVAQKCiwf+M+j9pSO2pUgcpkDO1wKhX9H7Cmg2zX11
Qxt3fjQbx6+jFBb7ERP1KpjV9JpI8YE8vA8xftulFUH7eODuSjphqFaM0mUykCKs
JpjwzvSToKMCa9XisRPw8MmPssXpw6XvFcUM1FBilaEEC6x/ViBUd3NSDXuQp5ht
Tzl78LKrfhXYIu+GnUVlzdFyLptcyyeh81ESnnK6WsCCWUKPRryaJek8D0V2Bebi
xVl1Im6y70BPf2KIcRsYN9XYR/Uq0fMh3sweW/3EZ5sp0mJ2oh7crzBQ8mR8Getu
iIrkm/aboNw36Zae9lrRxtHiYG4O45k9lJ/544AF7yw/f0LBU6Ciag==
=6kmW
iQEVAwUBRq9VV3cLPEOTuEwVAQL8NQf/RSVGXcdNQqo3kgBv7S6mTXaigx2vXYlv
rT828kebA4Kh2K+4+0Ye9Ol3utJG8gZgWToDhVn8xOcmEOxM5ZI/DncY5ipG3EgE
ZZcbaQQ6K0jOlZPxBMUhA7TbWX+AjnyG5H/zAtuvneB+LHfbHy5F1rRgJOzgjkg+
YZqcyYqmC2tHMpeZ5UZXPZujHLfTwlIH8hdt15fb9oiS6vGaky+e4iMSQM5LmRjD
nXQN/yPwdQbNr/GB4333knl/WU5OBBcO4ynxvWMoHHZEECCTTPE+W7wj19Eogzl3
D42zFB7NqUya8k+SEtAZ50BRGVjx0GJ6Yx8vRdwepmnZ4iOjhylUeg==
=BeBy
-----END PGP SIGNATURE-----
2 changes: 1 addition & 1 deletion lib/Math/BigInt/GMP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use 5.006002;

use vars qw/$VERSION/;

$VERSION = '1.23';
$VERSION = '1.24';

use XSLoader;
XSLoader::load "Math::BigInt::GMP", $VERSION;
Expand Down
4 changes: 2 additions & 2 deletions typemap
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ INPUT
MPZ
if (sv_derived_from($arg, \"Math::BigInt::GMP\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = ($type) tmp;
$var = INT2PTR($type, tmp);
}
else
croak(\"$var is not of type Math::BigInt::GMP\")

OUTPUT
MPZ
sv_setref_pv($arg, \"Math::BigInt::GMP\", (void*)$var);
sv_setref_pv($arg, \"Math::BigInt::GMP\", INT2PTR(void*, $var));

0 comments on commit 47689c6

Please sign in to comment.