AGS wrote:On a 64bit version of windows an integer is 32 bits, a long is 32 bits and a long long is 64 bits.
Code: Select all
print sizeof(integer)
print sizeof(long)
print sizeof(longint)
Code: Select all
4
4
8
Code: Select all
8
4
8
AGS wrote:On a 64bit version of windows an integer is 32 bits, a long is 32 bits and a long long is 64 bits.
Code: Select all
print sizeof(integer)
print sizeof(long)
print sizeof(longint)
Code: Select all
4
4
8
Code: Select all
8
4
8
Yes, good find, thanks!AGS wrote:I could not find code in the h2bi package that shows how to deal with platform dependent differences (64bit).
On a 64bit version of windows an integer is 32 bits, a long is 32 bits and a long long is 64 bits.
On a 64bit version of linux an integer is 32 bits, a long is 64 bits and a long long is 64 bits as well.
Notice the difference: long is 64 bits on linux and 32 bits on windows. Meaning that translation of
long depends upon the platform used. The table h2bi uses to translate standard C types to standard
fb types does not contain platform dependent definitions.
This means that translation of long might not always turn out the way it should?
Code: Select all
'Typ_.add( "unsigned long ", "ULONG")
Typ_.add( "unsigned long ", "culong")
'Typ_.add( "signed long ", "LONG")
Typ_.add( "signed long ", "clong")
...
'Typ_.add( "long ", "LONG")
Typ_.add( "long ", "clong")
Code: Select all
'Typ_.add( "long double ", "DOUBLE")
Typ_.add( "long double ", "clongdouble")
Yeah, it's from the time before fb-frog.AGS wrote:I like the header at the German fb site( Especially the SWIG-Alternative part :) ;) )h_2_bi.bas (SWIG-Alternative, Version 0.2.4)
I don't see an advantage using lua. But why not? Start, if you like.AGS wrote:And last but not least: how about a Geany-lua port of your tool? Using Geany-lua a program has access to the content
of a document while editing using Geany. You use Geany, other fb users use Geany... what do you think?
Code: Select all
' re-change culonglongint -> ULONGINT
Typ_.add("unsigned long long int ", "ULONGINT")
...
' re-change clonglongint -> LONGINT
Typ_.add( "signed long long int ", "LONGINT")
...
' add new line below (order is important !!!)
Typ_.add( "long long int ", "LONGINT")