Andrew Talbot andrew.talbot@talbotville.com writes:
Is there anything wrong with this patch? (Having two "JoystickImpl" types in the same dll confounds some static analyisis programs.)
The types are local to the C file so there is no clash. If some tools don't understand that they need to be fixed.
Alexandre Julliard wrote:
The types are local to the C file so there is no clash. If some tools don't understand that they need to be fixed.
Not arguing, just clarifying:
File #1: joystick_input.c has a non-static struct tag called "JoystickImpl". File #2: joystick_linuxinput.c has a differently defined non-static tag called "JoystickImpl". Since neither is declare static, do these not occupy the same namespace?
Andrew Talbot Andrew.Talbot@talbotville.com writes:
Not arguing, just clarifying:
File #1: joystick_input.c has a non-static struct tag called "JoystickImpl". File #2: joystick_linuxinput.c has a differently defined non-static tag called "JoystickImpl". Since neither is declare static, do these not occupy the same namespace?
Static is for variables, not for types. Types are local to the file they are declared in, that's why you need header files when you want to share type declarations.
Alexandre Julliard wrote:
Static is for variables, not for types. Types are local to the file they are declared in, that's why you need header files when you want to share type declarations.
Ah, yes. It seems that only objects (i.e., named regions of storage) and functions with external linkage can be accessible throughout the whole program (or dll, in this case). And a structure tag is merely an identifier not an object.
Thanks,