Any time I needed this in the past, I've used explicit Cython casts,
like <void*>, <PyObject*>, or <object>.

On Fri, Jan 30, 2009 at 3:55 PM, Dag Sverre Seljebotn
<[email protected]> wrote:
> Dag Sverre Seljebotn wrote:
>> I need to convert a Python object to void* and back again, and also from
>> object to PyObject*. Is there a way of doing this without getting
>> warnings? If not, how can I introduce one? (Warning compiler directives?
>> In that case we should start numbering the warnings...)
>
> As usual, sending an email spawns a solution in my head...
>
> cdef extern from *:
>     cdef void* tovoid "(void*)"(object)
>
> Anyone better/anything cleaner though? (If not I'll file a ticket to
> make such explicit conversions magic functions in the cython module.)
>
> --
> Dag Sverre
> _______________________________________________
> 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

Reply via email to