Original date:2014-11-20 19:31:23 Edited by: petelomax Subject: Re: this override business

That doesn't convince me at all.

There was nothing to stop you defining cfunc/cproc/peekstring, or cFunc/cProc/peekString, or something else.
[Edit: oops, I see now, it is a drop-in replacement for machine.e and dll.e, I didn't realise that. However it makes the last part even truer.]

Someone will code, unnecessarily:

if ptr=NULL then 
    name = "" 
    name = peek_string(ptr) 
end if 

and I'd agree with a "so what" attitude to that. However:

res = c_func(...) 
res = peek_string(res) 

could easily be code that works just fine somewhere else, and simply including euadvlib breaks it. Worse still, those two lines could easily be miles apart, and because of the bug in peek_string that you mentioned, it might well crash without a proper error message, and, admittedly a bit unlikely, will do exactly that if the c_func is after include euadvlib but the peek_string is before it. It also occurs to me that writing a "safe" wrapper around a broken function a) risks reducing the pressure to get it fixed, and b) is simply not right, though I can accept that is down to a messy/scary/difficult/lengthy "build OpenEu" process.


Not Categorized, Please Help


Quick Links

User menu

Not signed in.

Misc Menu