Mercurial > octave
comparison libinterp/octave-value/ov-fcn.h @ 30826:243b51ec9ff0 stable
Remove `time_t` from API (bug #61821).
The bit-width of `time_t` might change depending on compile time switches.
That can cause a mismatch between class declarations in public headers and the
actual alignment of the compiled classes. Avoid that problem by not using
`time_t` in (public) headers.
* build-aux/mk-octave-config-h.sh, oct-conf-post.in.h: Define OCTAVE_TIME_T to
`int64_t`. The type of `time_t` is not defined in the C/C++ standards. However
in all(?) implementations, it's either a signed 32-bit or a signed 64-bit
integer. Use a signed 64-bit integer for storing those values in Octave classes.
* other files: Use OCTAVE_TIME_T instead of `time_t`. Don't include <ctime> in
files where it's not needed.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 26 Feb 2022 13:46:48 +0100 |
parents | 796f54d4ddbf |
children | e88a07dec498 |
comparison
equal
deleted
inserted
replaced
30824:0ffe2f9a19f3 | 30826:243b51ec9ff0 |
---|---|
93 virtual void mark_fcn_file_up_to_date (const octave::sys::time&) { } | 93 virtual void mark_fcn_file_up_to_date (const octave::sys::time&) { } |
94 | 94 |
95 virtual octave::symbol_scope scope (void) { return octave::symbol_scope (); } | 95 virtual octave::symbol_scope scope (void) { return octave::symbol_scope (); } |
96 | 96 |
97 virtual octave::sys::time time_parsed (void) const | 97 virtual octave::sys::time time_parsed (void) const |
98 { return octave::sys::time (static_cast<time_t> (0)); } | 98 { return octave::sys::time (static_cast<OCTAVE_TIME_T> (0)); } |
99 | 99 |
100 virtual octave::sys::time time_checked (void) const | 100 virtual octave::sys::time time_checked (void) const |
101 { return octave::sys::time (static_cast<time_t> (0)); } | 101 { return octave::sys::time (static_cast<OCTAVE_TIME_T> (0)); } |
102 | 102 |
103 virtual int call_depth (void) const { return 0; } | 103 virtual int call_depth (void) const { return 0; } |
104 | 104 |
105 virtual bool is_nested_function (void) const { return false; } | 105 virtual bool is_nested_function (void) const { return false; } |
106 | 106 |