Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 56a3bd22 authored by Vincent Danjean's avatar Vincent Danjean
Browse files

Update perl XS files

- new ppport.h file
- xs and inc files patched as suggested by ppport.h
parent 81706bbf
No related branches found
No related tags found
No related merge requests found
......@@ -123,14 +123,14 @@ DoublePermutation(nb_sample, nb_chi2, data)
av_push(ra, newSVnv(rep[j]));
//fprintf(stderr, "chi2[%i]=%lf\n", j ,rep[j]);
}
hv_store(RETVAL, "chi2", 4, newRV((SV *)ra), 0);
hv_store(RETVAL, "chi2", 4, newRV_inc((SV *)ra), 0);
ra = (AV *)sv_2mortal((SV *)newAV());
for (j=0; j<nb_sample; j++) {
av_push(ra, newSVnv(ens[j]));
//fprintf(stderr, "pmin[%i]=%lf\n", j ,rep[j]);
}
hv_store(RETVAL, "distrib_pmin", 12, newRV((SV *)ra), 0);
hv_store(RETVAL, "distrib_pmin", 12, newRV_inc((SV *)ra), 0);
free_matrice(mat, nb_sample, nb_chi2);
free_replicat(rep);
......@@ -221,7 +221,7 @@ ResamplingChi2(leaf_refs, leaf_depth, leaf_parent, nleaf_parent, max_depth, prol
av_push(ra, newSVnv(results[i]));
//fprintf(stderr, "chi2[%i]=%lf\n", i ,results[i]);
}
hv_store(RETVAL, "chi2s", 5, newRV((SV *)ra), 0);
hv_store(RETVAL, "chi2s", 5, newRV_inc((SV *)ra), 0);
free(lcc);
free(tree.ld);
......
......@@ -32,37 +32,37 @@ constant(sv)
break;
/* Uncomment this if you need to return IVs
case PERL_constant_ISIV:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHi(iv);
break; */
/* Uncomment this if you need to return NOs
case PERL_constant_ISNO:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_no);
break; */
/* Uncomment this if you need to return NVs
case PERL_constant_ISNV:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHn(nv);
break; */
/* Uncomment this if you need to return PVs
case PERL_constant_ISPV:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHp(pv, strlen(pv));
break; */
/* Uncomment this if you need to return PVNs
case PERL_constant_ISPVN:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHp(pv, iv);
break; */
/* Uncomment this if you need to return SVs
case PERL_constant_ISSV:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHs(sv);
break; */
......@@ -71,13 +71,13 @@ constant(sv)
break; */
/* Uncomment this if you need to return UVs
case PERL_constant_ISUV:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHu((UV)iv);
break; */
/* Uncomment this if you need to return YESs
case PERL_constant_ISYES:
EXTEND(SP, 1);
EXTEND(SP, 2);
PUSHs(&PL_sv_undef);
PUSHs(&PL_sv_yes);
break; */
......
#include "ppport.h"
#define PERL_constant_NOTFOUND 1
#define PERL_constant_NOTDEF 2
#define PERL_constant_ISIV 3
......
#include "ppport.h"
void
constant(sv)
PREINIT:
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment