• Ethan Steinberg's avatar
    Fix functional.h bug + introduce test to verify that it is fixed (#4254) · ee2b5226
    Ethan Steinberg authored
    
    
    * Illustrate bug in functional.h
    
    * style: pre-commit fixes
    
    * Make functional casting more robust / add workaround
    
    * Make function_record* casting even more robust
    
    * See if this fixes PyPy issue
    
    * It still fails on PyPy sadly
    
    * Do not make new CTOR just yet
    
    * Fix test
    
    * Add name to ensure correctness
    
    * style: pre-commit fixes
    
    * Clean up tests + remove ifdef guards
    
    * Add comments
    
    * Improve comments, error handling, and safety
    
    * Fix compile error
    
    * Fix magic logic
    
    * Extract helper function
    
    * Fix func signature
    
    * move to local internals
    
    * style: pre-commit fixes
    
    * Switch to simpler design
    
    * style: pre-commit fixes
    
    * Move to function_record
    
    * style: pre-commit fixes
    
    * Switch to internals, update tests and docs
    
    * Fix lint
    
    * Oops, forgot to resolve last comment
    
    * Fix typo
    
    * Update in response to comments
    
    * Implement suggestion to improve test
    
    * Update comment
    
    * Simple fixes
    Co-authored-by: default avatarpre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
    Co-authored-by: default avatarAaron Gokaslan <aaronGokaslan@gmail.com>
    ee2b5226
test_callbacks.cpp 10.6 KB