Am Fri, 27 Apr 2012 13:26:49 +0200 schrieb "David Nadlinger" <[email protected]>:
> On Friday, 27 April 2012 at 11:09:41 UTC, James Miller wrote: > > It is a binding. There are some very minor cosmetic changes that > > will be detailed, but otherwise you can just copy-paste a C > > example into D, make it D-compatible and it will work as > > intended. > > It depends on how minor the changes are, but generally please > refrain from making »cosmetic« changes to the C API. Deimos > bindings should be the verbatim headers translated to D, and just > that (this also means that importing them never requires an > additional compilation unit to be linked in) – anything else is > better left to wrapper projects. > > David I think it is understood and he was referring to renaming the enum members, for which you have to write different code when using them in D anyway: In C: STATUS_SUCCESS In D unmodified: cairo_status_t.STATUS_SUCCESS In D with cosmetic changes: cairo_status_t.SUCCESS It doesn't change the semantics or add code. It could just as well be a Deimos coding standard. -- Marco
