← Back to team overview

kicad-developers team mailing list archive

Re: Python: time_t needs mapping; tentative patch

 

On 7 December 2017 at 05:12, jp charras <jp.charras@xxxxxxxxxx> wrote:
> Le 07/12/2017 à 09:11, jp charras a écrit :
>> Le 07/12/2017 à 01:20, Wayne Stambaugh a écrit :
>>> JP,
>>>
>>> Would you please test this patch when you get a chance?  I took a quick
>>> look at it and it seems correct but I don't know when I will have time
>>> to test it.
>>>
>>> Thanks,
>>>
>>> Wayne
>>
>> No problem.
>>
>>>
>>> On 12/05/2017 12:00 PM, Henner Zeller wrote:
>>>> Alright, here is a reworked patch that includes the ideas discussed here
>>>>
>>>>   - Where we used to use time_t in the functions that deal with
>>>> timestamps, this is now done with a new typedef timestamp_t that makes
>>>> sure the c++ side and swigged Python side agree on the type.
>>>>   - this typedef is now in common.h, close to the declaration of
>>>> GetNewTimeStamp()
>>>>   - The type of this type is 'long' as this makes sure that it is at
>>>> least 32 bits. Trying to use something like int32_t did not work well
>>>> with swig that seems to be more comfortable by default with the
>>>> standard types (but some local Swig expert might know how to do this)
>>>>
>>>> Cheers,
>>>>   Henner.
>>
>>
>
> Hi Henner,
>
> I committed your patch. Thanks.

Thanks Jean-Pierre. I confirmed that getting/setting timestamps now
works in Python (which triggered this all).

-h

>
> --
> Jean-Pierre CHARRAS
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


References