FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Const problem with DerelictFT

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
baxissimo



Joined: 23 Oct 2006
Posts: 241
Location: Tokyo, Japan

PostPosted: Tue Feb 17, 2009 12:58 am    Post subject: Const problem with DerelictFT Reply with quote

In fttypes.d there's this struct:

Code:
struct FT_Open_Args
{
 FT_UInt flags;
 const FT_Byte* memory_base;
 FT_Long memory_size;
 FT_String* pathname;
 FT_Stream stream;
 FT_Module driver;
 FT_Int num_params;
 FT_Parameter* params;
}


That const generates an error now with DMD 1.040 when you try to set the memory_base member. (Could have been added anywhere between 1.038 and 1.040).

Anyway, what is the intent? If it is that the bytes be const but not the pointer, as in C, such a thing does not work in D. And according to Walter you should just remove it for D1.

For D2 if it's trying to do const-bytes unconst pointer, then it should be

Code:
const(FT_Byte)* memory_base;
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Tue Feb 17, 2009 4:51 pm    Post subject: Reply with quote

Thanks, Bill. No idea why that was there, but it's gone from the trunk.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group