Re: Question about function aliases

2013-12-17 Thread Gary Willoughby
On Thursday, 12 December 2013 at 11:39:56 UTC, FreeSlave wrote: I guess alias also should include extern(C) declaration i.e. the right way is alias Tcl_InterpDeleteProc = extern(C) void function(ClientData clientData, Tcl_Interp* interp) nothrow; Unfortunately that syntax doesn't compile. The

Re: Question about function aliases

2013-12-12 Thread Gary Willoughby
On Thursday, 12 December 2013 at 00:51:56 UTC, dnewbie wrote: On Wednesday, 11 December 2013 at 23:42:44 UTC, Gary Willoughby wrote: For example i have some C code like this: typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp)); void

Re: Question about function aliases

2013-12-12 Thread bearophile
Gary Willoughby: alias void function(ClientData clientData, Tcl_Interp* interp) Tcl_InterpDeleteProc; extern (C) void Tcl_CallWhenDeleted(Tcl_Interp* interp, Tcl_InterpDeleteProc proc, ClientData clientData); With recent D compilers I prefer the alias with = and a more aligned colums

Re: Question about function aliases

2013-12-12 Thread FreeSlave
On Thursday, 12 December 2013 at 11:11:55 UTC, bearophile wrote: Gary Willoughby: alias void function(ClientData clientData, Tcl_Interp* interp) Tcl_InterpDeleteProc; extern (C) void Tcl_CallWhenDeleted(Tcl_Interp* interp, Tcl_InterpDeleteProc proc, ClientData clientData); With recent D

Question about function aliases

2013-12-11 Thread Gary Willoughby
For example i have some C code like this: typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp)); void Tcl_CallWhenDeleted(Tcl_Interp* interp, Tcl_InterpDeleteProc* proc, ClientData clientData); I intend on converted this to D thus: alias void

Re: Question about function aliases

2013-12-11 Thread dnewbie
On Wednesday, 11 December 2013 at 23:42:44 UTC, Gary Willoughby wrote: For example i have some C code like this: typedef void (Tcl_InterpDeleteProc) _ANSI_ARGS_((ClientData clientData, Tcl_Interp *interp)); void Tcl_CallWhenDeleted(Tcl_Interp* interp, Tcl_InterpDeleteProc* proc, ClientData