Callback on include (#67)
* stable on python 2 * Stable on python 2 and 3 (fixed utf-8 and ascii encoding issues) * Still needs compatible yara submodule update once pull request accepted * * Fixed all encoding issues * Proper error handling * Updating yara submodule to reference yara patched with include callback support * Updating submodule's branch * Updating yara submodule * Updating yara submodule * Updating yara submodule * Updating yara submodule * Submodule update * * Fixing memory leaks * Fixing errors handling * making error messages order consistent between include_callback and default yara behaviour * Removing exception printing when callback fails * Minor re-styling. * Destroy compiler if PyCallable_Check(include_callback) fails. * References to Py_None should be increased. * Use Py_DECREF instead of Py_XDECREF for references that can't be NULL. * Minor re-styling. * Fix reference leak. After calling Py_INCREF(include_callback) some code paths were leading to a return without calling Py_DECREF. Calling Py_INCREF before yr_compiler_set_include_callback is not necessary, as this function doesn't yield control to Python, but it should be called before yr_compiler_add_XX. * Remove unnecessary calls to Py_INCREF/Py_DECREF. The references were already incremented in yara_compile. * Implement test case for include callbacks * Point yara submodule to official repository.
Showing
Please
register
or
sign in
to comment