I've got a substantial number of entry points named like
function gpiod_is_gpiochip_device(path:Pchar):boolean; CDECL__ GPIODLIB__
function gpiod_chip_open(path:Pchar):pgpiod_chip; CDECL__ GPIODLIB__
procedure gpiod_chip_close(chip:Pgpiod_chip); CDECL__ GPIODLIB__
function gpiod_chip_name(chip:Pgpiod_chip):Pchar; CDECL__ GPIODLIB__
That's from an include file which is incorporated into automatically-generated units for static and dynamic linkage.
The objective is that these will always be accessed using either a unit name or an object reference, i.e. like
chipHandle := Gpiod.gpiod_chip_open(PChar('/dev/gpiochip' + guiTestForm.PortName));
gpios := Gpiod.gpiod_chip_num_lines(chipHandle);
In principle I could trim the leading
gpiod_ in each function name as redundant, but in order to avoid ambiguity is there any way that I could mark the static unit as always requiring fully-qualified references, i.e. so that
chipHandle := chip_open(PChar('/dev/gpiochip' + guiTestForm.PortName));
gpios := chip_num_lines(chipHandle);
was not accepted by the compiler?
MarkMLl