[Geany-Devel] Python question

Lex Trotman elextr at xxxxx
Sat Apr 26 13:02:38 UTC 2014


On 26 April 2014 21:45, Pavel Roschin <roshin at scriptumplus.ru> wrote:
>> ***VERY*** evil >:-D
>
> It is :-D
>
>> Is int the same size as pointer on your system? On windows in
>> particular int can be 32 bit and pointer 64 bit.
>
> With both ways (int, long) I can't achieve result. Seems that this is not
> actual doc pointer or something. Without native binding can't imagine how to do
> that.

A python int is the underlying C long see
https://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex,
but unfortunately on windows 64 thats still 32 bits, see
http://msdn.microsoft.com/en-us/library/windows/desktop/aa383751%28v=vs.85%29.aspx.

We have had problems in Geany in the past where people tried to pack
pointers into a long, worked on Linux, failed on Win64.

(I'm thinking I remember you are using Windows, if I'm wrong please disregard)

Unfortunately I can't actually think of how you could do it in
Geanypy, I think you would be better off doing it in C.

Cheers
Lex

PS but at least you have restarted the discussion on the PR ;)

>
>
> --
> Best regards,
> Pavel Roschin aka RPG
> _______________________________________________
> Devel mailing list
> Devel at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/devel


More information about the Devel mailing list