in reply to Re^5: Managing C library memory in XS
in thread Managing C library memory in XS
As far as I know, the dual-value feature is basically there in the name of efficiency, so that you can have '123' and 123 at the same time. But I am not qualified to answer your question about interpreter guarantees or the lack thereof.
Having dual values IV/PV is not so rare a use case. One example is error-codes. Many modules provide the error message in string context and the integer error code when using int().
I also just found an example of PV/NV duality
What my suggestion did was IV/NV duality. But with the little twist that the SVf_NOK flag was not set. It was for internal usage of back-referencing the owning object only. ... Who's using that NV slot anyway?
|
|---|