function shadowed

ddos via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Apr 8 05:04:59 PDT 2015


i got two modules
opengvg.d and vg.d

vg.d contains calls to external c functions
openvg.d should wrap and simplify some of those calls

in openvg.d i make public import of submodule vg.d
such that if openvg.d is imported the functions in vg.d can be 
called, this works as intended. but as soon as i overload a 
function from vg.d in openvg.d i can only call the function in 
openvg.d

example:
vg.d:
module vg;
extern (C) void  vgSetParameterfv(VGHandle object, VGint 
paramType, VGint count, VGfloat *values);

openvg.d
module openvg;
public import vg;

void vgSetParameterfv(VGHandle object, VGint paramType, 
const(VGfloat[]) values)
{
	vg.vgSetParameterfv(object, paramType, cast(int)values.length, 
cast(VGfloat*)values);
}

test.d
import openvg;
vgSetParameterfv(object, paramType, length, values); // call to 
fun in vg.d

how can i call both functions? i'd like to avoid using the module 
prefix vg.vgSetParameterfv if possible

source:
https://github.com/oggs91/OpenVG_D/blob/master/openvg/


More information about the Digitalmars-d-learn mailing list