X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Fcrush%2FCrushWrapper.i;fp=src%2Fceph%2Fsrc%2Fcrush%2FCrushWrapper.i;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=76340611b3ec79e0e930b20e15b16d2d7522f3c1;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/crush/CrushWrapper.i b/src/ceph/src/crush/CrushWrapper.i deleted file mode 100644 index 7634061..0000000 --- a/src/ceph/src/crush/CrushWrapper.i +++ /dev/null @@ -1,47 +0,0 @@ -/* File : CrushWrapper.i */ -%module CrushWrapper -%{ -#include "CrushWrapper.h" -%} - -%include typemaps.i - -// This tells SWIG to treat 'int *data' as a special case -%typemap(in) int *items { - AV *tempav; - I32 len; - int i; - SV **tv; -// int view; - - - //printf("typemap\n"); - - if (!SvROK($input)) - croak("$input is not a reference."); - if (SvTYPE(SvRV($input)) != SVt_PVAV) - croak("$input is not an array."); - - tempav = (AV*)SvRV($input); - len = av_len(tempav); - //printf("typemap len: %i\n",len); - $1 = (int *) malloc((len+1)*sizeof(int)); - for (i = 0; i <= len; i++) { - tv = av_fetch(tempav, i, 0); - $1[i] = (int) SvIV(*tv); - - /* - view = SvIV(*tv); - printf("view: %d",view); - printf("\n"); - */ - } -} - -%apply int *items { int *weights }; -%apply double *OUTPUT { double *min, double *max, double *avg }; - -/* Let's just grab the original header file here */ -%include "CrushWrapper.h" - -%clear double *min, double *max, double *avg;