While Mark (blitz-research / Speedy Snail) brought up the topic of passing strings to C not requiring "ToCString()" I scanned the git history of bcc to check when this automatic behaviour was added.
Now the questions are:
Why was this done?
Wouldn't one expect to pass the "object pointer" instead of some "magic auto generation"?
(What about the people who want to pass the string object / pointer instead of the string content?)
@HurryStarfish suggested (without much tinker-time - so just a "simple thought") to have something explicitely introduced, like the reverse of $z or $w.
Heya,
While Mark (blitz-research / Speedy Snail) brought up the topic of passing strings to C not requiring "ToCString()" I scanned the git history of bcc to check when this automatic behaviour was added.
Seems in 2014 ... https://github.com/bmx-ng/bcc/commit/ce468573343844a77e900ec479a6727a271a49b8
Now the questions are: Why was this done? Wouldn't one expect to pass the "object pointer" instead of some "magic auto generation"? (What about the people who want to pass the string object / pointer instead of the string content?)
@HurryStarfish suggested (without much tinker-time - so just a "simple thought") to have something explicitely introduced, like the reverse of
$z
or$w
.