Commit Graph

17 Commits

Author SHA1 Message Date
Nguyen Anh Quynh 7ede48cd90 python: temporarily comment out skipdata setup, which is still broken on MacOS. #1316 2019-01-02 10:11:48 +08:00
Nguyen Anh Quynh 472bd43fcf python: rename getter/setter skipdata_cb to skipdata_callback. Hello 2019 2019-01-01 00:22:45 +08:00
Nguyen Anh Quynh a593f8d028 python: attempt to fix #1320 2018-12-31 15:51:50 +08:00
Семён Марьясин 6c54814d25 Fix skipdata setup (#1320)
* Fix skipdata_setup for when _cb is None

ctypes prototype does not accept None value,
so if we want to get a NULL function pointer
then we should either call it with no arguments
or pass zero as an argument.

Fixes #1316

* Do store and return skipdata_setup data

* Add convenience wrappers for skipdata_setup

* Uncomment skipdata_setup tests

* Add alternate usage variants to test_skipdata.py

* document getter
2018-12-31 15:42:44 +08:00
Nguyen Anh Quynh bd8e5ba370 python: cast skipdata function inside binding to simplify the API 2016-10-02 01:35:28 +08:00
Niels Boehm 32b6346c2c Use and test syntax against None in all_tests.
Comparing against 0 or just testing the truthiness is suboptimal, as you
lose the ability to explicitly set the syntax to CS_OPT_SYNTAX_DEFAULT
or 0.

Also, using None to mean "don't change" or other "here is no value"
interpretations is much more pythonic than the C-idiomatic 0.
2016-06-13 12:25:24 +02:00
Nguyen Anh Quynh 03d1e1f86d python: clean up test_*.py 2015-04-27 11:51:48 +08:00
Nguyen Anh Quynh 44adb35f6a python: clean test_skipdata.py 2015-04-27 11:12:53 +08:00
Nguyen Anh Quynh cbc7dd9392 python: fix test_skipdata.py after the change in the core on SKIPDATA's callback prototype 2014-07-10 15:57:42 +08:00
Nguyen Anh Quynh 1098329f40 python: refactor tests, so it is possible to reuse print_insn_detail() of all archs 2014-05-17 09:51:15 +08:00
Nguyen Anh Quynh 4b9de0df04 python: change SKIPDATA's callback prototype after the last change in the core 2014-04-14 14:56:25 +08:00
Nguyen Anh Quynh 749046bbdc python: initial Python3 support 2014-04-12 01:15:10 +08:00
Nguyen Anh Quynh b64d1cf193 refine the comments for Skipdata sample code 2014-04-10 23:05:28 +08:00
Nguyen Anh Quynh 301d740aa3 python: rename skipdata_opt to skipdata_setup & handle callback properly 2014-04-10 22:34:27 +08:00
Nguyen Anh Quynh 1eccbaba38 python: minor fix for test_skipdata.py 2014-04-10 17:48:19 +08:00
Nguyen Anh Quynh c2638ce57f python: disable setup to skipdata_opt in test_skipdata.py 2014-04-10 16:10:57 +08:00
Nguyen Anh Quynh f0c577fd3d python: support SKIPDATA option. this also adds test_skipdata.py 2014-04-10 16:09:15 +08:00