Euphoria Ticket #726: sizeof memstruct shows different values

I use Win7 (32-bit) and Euphoria built with gcc 3.5.2


Euphoria Interpreter v4.1.0 development
32-bit Windows, Using System Memory
Revision Date: 2011-11-25 13:09:33, Id: 5276:ecc396811123

Following the Window.exw example with memstruct I tried to build some memstructs e.g.

include std/console.e 
include std/machine.e 
 
	public memtype    
		char as BYTE,   
		int as BOOL,   
		int as INT,   
-- 		unsigned int as UINT,   
		int as UINT,   
		long as LONG,   
-- 		unsigned long as ULONG,   
		long as ULONG,   
		double as DOUBLE,   
		short as WORD,   
		long as DWORD,   
		object as HANDLE,   
		object as HWND,   
		object as LPSTR,   
--		object as WNDPROC,  
-- 		signed long int as ZWORD, --test   
	$   
 
 
--struct SHFILEINFO 
 
memstruct SHFILEINFO 
HANDLE  hIcon 
INT   iIcon 
DWORD  dwAttributes 
BYTE szDisplayName[260]  --[260] 
BYTE szTypeName[80]  --[80] 
end memstruct 
 
--352,  -- size 
 
? sizeof(SHFILEINFO) 
 
puts(1,"Enter ...") 
wait_key() 

This shows a size of 640, I expected a value of 352. If I comment everything out except szDisplayName or leaving szTypeName alone or commenting out the two arrays will show the correct value. Every other combination with array is wrong. Is there a mistake in my code?

Details

Type: Bug Report Severity: Normal Category: Interpreter
Assigned To: unknown Status: Fixed Reported Release:
Fixed in SVN #: View VCS: none Milestone:

1. Comment by mattlewis Mar 01, 2013

Looks like whatever the problem was, it has been fixed in the mean time.

Search



Quick Links

User menu

Not signed in.

Misc Menu