~mdw
/
catacomb-perl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Various changes. Kinda in the middle of it here, but it seems to work.
[catacomb-perl]
/
mpstuff.c
diff --git
a/mpstuff.c
b/mpstuff.c
index
c891a76
..
e048ff1
100644
(file)
--- a/
mpstuff.c
+++ b/
mpstuff.c
@@
-112,8
+112,7
@@
mp *mp_fromsv(SV *sv, const char *what, const char *ty,
{
mp *m;
if (SvROK(sv)) {
{
mp *m;
if (SvROK(sv)) {
- if (sv_derived_from(sv, "Catacomb::MP") ||
- sv_derived_from(sv, "Catacomb::GF"))
+ if (sv_derived_from(sv, "Catacomb::MP"))
m = (mp *)SvIV((SV *)SvRV(sv));
else {
va_list ap;
m = (mp *)SvIV((SV *)SvRV(sv));
else {
va_list ap;
@@
-122,6
+121,8
@@
mp *mp_fromsv(SV *sv, const char *what, const char *ty,
sv_vsetpvfn(t, what, strlen(what), &ap, 0, 0, 0);
croak("%s is not of type %s", SvPVX(t), ty);
}
sv_vsetpvfn(t, what, strlen(what), &ap, 0, 0, 0);
croak("%s is not of type %s", SvPVX(t), ty);
}
+ if (m && keep)
+ MP_COPY(m);
} else {
if (SvIOK(sv))
m = mp_fromiv(MP_NEW, SvIV(sv));
} else {
if (SvIOK(sv))
m = mp_fromiv(MP_NEW, SvIV(sv));