View Full Version : support for none case sensitive languages

02-17-2010, 08:37 PM
there are some defines in UPPERCASE with the same name in lowercase

for example:
typedef float cl_float
and later
#define CL_FLOAT

happy number crunching


02-18-2010, 08:05 AM
Yeah, CL naming scheme causes quite a lot of naming collisions in non-case sensitive languages (such as Delphi).

cl_device_type, CL_DEVICE_TYPE
cl_context_properties, CL_CONTEXT_PROPERTIES
cl_mem_flags, CL_MEM_FLAGS

OpenGL seems to have a lot less collisions, because only the function names + types are able to collide, and it seems unlikely that you'd have new functions called "glInt()", "glEnum()" etc. The constants + type names can't collide because they start with "GL_" or "GL".

I think we're stuck with the current system now, so the way I work around it in Delphi is to have all the types prefixed with "T", which is a normal Delphi convention, and leave all the constants as they are:
Tcl_char = ShortInt;
Tcl_uchar = Byte;

This allows one rule to prevent the collisions, which seems easier to handle than just renaming the specific names that collide.