diff options
author | m8pple <dt10@imperial.ac.uk> | 2014-10-21 10:20:11 +0100 |
---|---|---|
committer | m8pple <dt10@imperial.ac.uk> | 2014-10-21 10:20:11 +0100 |
commit | d1c0122cb644c701c2e5790f042b5deaf3edde5f (patch) | |
tree | 20157370e6bfaa91460be1ede2f1048848b709bf | |
parent | a73aed0790d6f56cbf70bd1453cdd77a38d1c3cc (diff) | |
download | MipsCPU-d1c0122cb644c701c2e5790f042b5deaf3edde5f.tar.gz MipsCPU-d1c0122cb644c701c2e5790f042b5deaf3edde5f.zip |
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.
-rw-r--r-- | include/mips_cpu.h | 4 |
1 files changed, 3 insertions, 1 deletions
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. |