const char* or const(char)* when porting C headers?

2013-12-21 Thread Gary Willoughby
When porting C headers which include function declarations with using char* types. Is it best to use const char* or const(char)* as the type in the D declaration?

Re: const char* or const(char)* when porting C headers?

2013-12-21 Thread Adam D. Ruppe
On Sun, Dec 22, 2013 at 12:47:45AM +, Gary Willoughby wrote: > When porting C headers which include function declarations with > using char* types. Is it best to use const char* or const(char)* > as the type in the D declaration? Doesn't really matter: both work exactly the same way. I kind

Re: const char* or const(char)* when porting C headers?

2013-12-21 Thread Alexandr Druzhinin
22.12.2013 07:47, Gary Willoughby пишет: When porting C headers which include function declarations with using char* types. Is it best to use const char* or const(char)* as the type in the D declaration? C vs D const char* == const(char)* const char const* == const char*

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Gary Willoughby
On Sunday, 22 December 2013 at 04:06:05 UTC, Alexandr Druzhinin wrote: 22.12.2013 07:47, Gary Willoughby пишет: When porting C headers which include function declarations with using char* types. Is it best to use const char* or const(char)* as the type in the D declaration? C vs D const char*

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Gary Willoughby
On Sunday, 22 December 2013 at 15:49:43 UTC, Gary Willoughby wrote: Thanks, that makes sense. But how would i port this parameter: and these: CONST84 char **tablePtr = ? CONST84 char ***argvPtr = ?

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Benjamin Thaut
Am 22.12.2013 17:02, schrieb Gary Willoughby: On Sunday, 22 December 2013 at 15:49:43 UTC, Gary Willoughby wrote: Thanks, that makes sense. But how would i port this parameter: and these: CONST84 char **tablePtr = ? CONST84 char ***argvPtr = ? In C/C++ the const always applies to whatever

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Gary Willoughby
On Sunday, 22 December 2013 at 16:45:15 UTC, Benjamin Thaut wrote: Am 22.12.2013 17:02, schrieb Gary Willoughby: On Sunday, 22 December 2013 at 15:49:43 UTC, Gary Willoughby wrote: Thanks, that makes sense. But how would i port this parameter: and these: CONST84 char **tablePtr = ? CONST84

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Benjamin Thaut
Am 22.12.2013 18:39, schrieb Gary Willoughby: Ah right, so: struct Tcl_Obj * CONST * objv would be: const(Tcl_Obj*)* objv or const(Tcl_Obj*)[] objv Yes

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Gary Willoughby
On Sunday, 22 December 2013 at 18:28:43 UTC, Benjamin Thaut wrote: Am 22.12.2013 18:39, schrieb Gary Willoughby: Ah right, so: struct Tcl_Obj * CONST * objv would be: const(Tcl_Obj*)* objv or const(Tcl_Obj*)[] objv Yes Great thanks! I thought i had a pretty good handle on C but porting

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Benjamin Thaut
Am 22.12.2013 20:34, schrieb Gary Willoughby: On Sunday, 22 December 2013 at 18:28:43 UTC, Benjamin Thaut wrote: Am 22.12.2013 18:39, schrieb Gary Willoughby: Ah right, so: struct Tcl_Obj * CONST * objv would be: const(Tcl_Obj*)* objv or const(Tcl_Obj*)[] objv Yes Great thanks! I thoug

Re: const char* or const(char)* when porting C headers?

2013-12-22 Thread Alexandr Druzhinin
22.12.2013 11:06, Alexandr Druzhinin пишет: 22.12.2013 07:47, Gary Willoughby пишет: When porting C headers which include function declarations with using char* types. Is it best to use const char* or const(char)* as the type in the D declaration? C vs D const char* == const(char)* const char c