On Tue, Sep 8, 2009 at 11:28 AM, Sanne Korzec<[email protected]> wrote:
>
> is there a way to write to the screen the value of a void* void** or
> float*, cause currently all float values return (0.0) in my implementation.
>
What about using C stdlib printf() using "%p" format, like this
cdef extern from "stdio.h":
int printf(char*,...)
cdef float *ptr = NULL
printf("%p\n", <void*>ptr)
>
>
>
>
> -----Original Message-----
> From: Robert Bradshaw [mailto:[email protected]]
> Sent: maandag 7 september 2009 23:53
> To: Cython-dev; Sebastien Binet
> Cc: [email protected]
> Subject: Re: [Cython] FW: cython and hash tables / dictionary
>
> Thanks for the implementation. I noticed that your compare was only
> comparing pointers, so if you had two equal strings at different
> memory addresses it wouldn't find them (which may or may not be what
> you'd want) Also, your pointers would go out of scope as soon as test
> ended (so you couldn't return ht and use it later).
>
> I built on what you had to get a float -> float hashtable. Note that
> this technique only works since the float value fits inside a void*,
> anything bigger and you'd have to allocate memory manually to stick
> it into the hashtable.
>
> - Robert
>
>
> _______________________________________________
> Cython-dev mailing list
> [email protected]
> http://codespeak.net/mailman/listinfo/cython-dev
>
--
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev