how to string → uint* ?

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sun Jun 28 03:08:58 PDT 2015


In addition to what anonymous said, you might want to raise a bug 
report with Derelict, because the function signatures are 
arguable wrong, though that depends on whether Derelict wants to 
provide a strict one-to-one mapping of the C code, or one that is 
already somewhat adapted to D:

https://github.com/DerelictOrg/DerelictSFML2/blob/master/source/derelict/sfml2/graphics.d#L521-L522

alias da_sfText_setString = void function( sfText*,const( char )* 
);

The documentation says that this is for ANSI strings, but `char` 
in D is defined to be a *UTF8* code unit. Instead, the type 
should be `const(ubyte)*`.

alias da_sfText_setUnicodeString = void function( sfText*,const( 
sfUint32 )* );

Probably better to use `const(dchar)*` here.


More information about the Digitalmars-d-learn mailing list