pyrex problem

borges2003xx at yahoo.it borges2003xx at yahoo.it
Fri Jun 17 04:03:14 EDT 2005


hi everyone
i'm newbie

i try to compile the pyrex module:
def controlla(char *test):
    cdef int limitem,lunghezz,li,l2,f,ii,kk
    cdef char *t1
    cdef char *t2
    limitem=4
    lunghezz=len(test)
    l1=lunghezz-limitem+1
    l2=lunghezz-limitem+1
    f=0
    for ii from 0 <= ii < l1-1:
        for kk from 0 <= kk < l2-1:
            t1=test[ii:ii+limitem]
            t2=test[kk:kk+limitem]

            if (ii<>kk):
                if t1==t2:
                    f=1
                if f==1:
                    break
    if f==0:
        return test
    else:
        return 'no'


but i receive the error:
obtaining char * from temporary python value

what happens?
thanx everyone
sorry for silly question.

giorgio borghi




More information about the Python-list mailing list