Swig python - c++ how to use type int8_t

后端 未结 1 615
忘了有多久
忘了有多久 2021-02-19 00:10

I have a C function that takes as paramenter an 8 bit integer

int8_t foo( int8_t x );

I would like to call this function from my python code us

相关标签:
1条回答
  • 2021-02-19 00:46

    In your SWIG interface file use:

    %include "stdint.i"
    

    before you first use uint8_t. SWIG will then apply an appropriate typemap for you.

    0 讨论(0)
提交回复
热议问题