From d1c0122cb644c701c2e5790f042b5deaf3edde5f Mon Sep 17 00:00:00 2001 From: m8pple Date: Tue, 21 Oct 2014 10:20:11 +0100 Subject: Fixed #7: Documented state parameter as non-empty Note that I would not really consider this as a backwards compatibility problem, as there is a documented way of returning error codes, and an error code exists for this situation. One would expect any reasonable implementation to check for non-null as a sanity check, as it so cheap. The exception would be if it was documented as a performance critical method (which it is, but we don't care about performance), where you would probably either put a blanket warning "No pre-conditions will be checked" for the module, or ideally on just the performance critical functions. --- include/mips_cpu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mips_cpu.h b/include/mips_cpu.h index 8af9827..5b66ab9 100644 --- a/include/mips_cpu.h +++ b/include/mips_cpu.h @@ -104,7 +104,9 @@ mips_error mips_cpu_get_pc( difficult, so _try_ to maintain it, but don't worry too much if under some exceptions it doesn't quite work. */ -mips_error mips_cpu_step(mips_cpu_h state); +mips_error mips_cpu_step( + mips_cpu_h state //! Valid (non-empty) handle to a CPU +); /*! Controls printing of diagnostic and debug messages. -- cgit