I'm currently involved in function interposing.
I'm currently involved in function interposing. I'm interposing many functions with many different signatures, but I still need some housekeeping for each function that I interpose. The housekeeping struct has pointers for both the original function and the replaced function. These members are necessarily typed as void . Later, when I want to call the original function, I assign to a properly typed variable to the value of the void original_function member. The compiler has no way to know if that void * is actually FILE (fopen )(char , char ) or if it's int(open )(char , int, ...). When everything can be properly typed, I only ever get warnings about assigning the wrong function types to the wrong function pointer variables.
Posted by delinka on Aug 2, 2015, 9:19 PM
Tags
Related issues
- That isn't really relevant for the tool starting the container.
- Why is there no link to the source?
- Something I wonder about in this domain is if this is the fault of the language.
- Namespace pollution is an annoying problem in Rust.
- Currently, no language ports of Timefold Solver are planned.
- I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Raise real-world problems, find people facing the same issue, and discuss solutions.5,000 issues0 comments
hackernews (Software)
That isn't really relevant for the tool starting the container.
Why is there no link to the source?
Something I wonder about in this domain is if this is the fault of the language.
Namespace pollution is an annoying problem in Rust.
Currently, no language ports of Timefold Solver are planned.
I agree with you, almost all .NET code I write is within the .NET framework, yet when I look at C# repos, it's disheartening to see so ma...
Why is there no simple workaround for this?
I have been using https://github.com/jacktasia/dumb-jump to quickly jump to definitions.
I'm currently involved in function interposing.
I'm currently involved in function interposing. I'm interposing many functions with many different signatures, but I still need some housekeeping for each function that I interpose. The housekeeping struct has pointers for both the original function and the replaced function. These members are necessarily typed as void . Later, when I want to call the original function, I assign to a properly typed variable to the value of the void original_function member. The compiler has no way to know if that void * is actually FILE (fopen )(char , char ) or if it's int(open )(char , int, ...). When everything can be properly typed, I only ever get warnings about assigning the wrong function types to the wrong function pointer variables.
Comments (0)
No comments yet. Start the discussion.