simendsjo wrote: > On 05.03.2011 08:58, "Jérôme M. Berger" wrote: >> simendsjo wrote: >>> On 04.03.2011 22:42, "Jérôme M. Berger" wrote: >>>> int main(string[] args) { >>>> auto s1 =(); // MH MH >>>> auto s2 =(); // OK >>>> s2.c =ull; // OK >>>> return 0; >>>> } >>> >>> Is part of your message gone? >>> >> Uh, I did not write that. > > Checked the web newsinterface, and I see your post. In thunderbird I got > another post from Tom with the subject "Struct reference returning > function and const members" in your post... > >>>> You can safely ignore the “ATTRIBUTE_FORMAT_FPTR(printf, 4, 5)”. >>> >>> That I understood :) Thanks! >> >> Then if the issue is with the rest of the definition, it is more or >> less equivalent to (you will need to translate the argument >> declaration too): >> >> alias size_t function (struct charset_info_st *, char *to, size_t n, >> const char *fmt, >> ...) snprintf; >> >> Jerome > > The definition is inside a struct. I shouldn't use an alias then..? > No, you are right, I thought there was a typedef in the C code...
> This is the C struct: > typedef struct my_charset_handler_st > { > // snip > size_t (*snprintf)(struct charset_info_st *, char *to, size_t n, > const char *fmt, > ...) ATTRIBUTE_FORMAT_FPTR(printf, 4, 5); > // snip > } > > And this is my D struct: > struct my_charset_handler_st > { > // snip > size_t function(charset_info_st*, char* to, size_t n, > const char* fmt, > ...) snprintf; > // snip > } Yes, that should be about right. Jerome -- mailto:jeber...@free.fr http://jeberger.free.fr Jabber: jeber...@jabber.fr
signature.asc
Description: OpenPGP digital signature