[bug #55810] sizeof() and whos() returns 0 bytes for classdef objects
Markus Mützel <[email protected]>
| Newsgroups | gmane.comp.gnu.octave.bugs |
|---|---|
| Message-ID | <[email protected]> |
Please use the bug tracker to post updates to a bug report. The mailing list is intended as a read-only notification stream. Info posted to this mailing list address won't appear in the tracker database where it is most useful.
Follow-up Comment #10, bug #55810 (group octave):
Thanks for the patch.
I haven't attempted to build with it yet.
Just a few comments after looking at it:
The one-line "body" of the for-loop in `octave_map::byte_size` is indented by
four additional spaces. We usually use two spaces per level for indentation.
We usually use two spaces before the (single) "#" character in inline comments
(also in tests).
You are using MATLAB compatible syntax for the test classdef files. Is that on
purpose?
The overall changes look good to me.
I'd need some more time to check what would be happening. Maybe, you know the
code better by now: How are "Dependent" properties treated? Would they be
skipped in the byte-sum?
E.g., would both properties "a" and "b" be counted in the following test
class?
classdef dependent_prop < handle
properties
a
end
properties (Dependent)
b
end
methods
function set.b(this, value)
this.a = value;
end
function value = get.b(this)
value = this.b;
end
end
end
I guess that only the byte-size of property "a" should be counted in that
example. (And the Dependent property "b" should be ignored.)
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?55810>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
(application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCac5/gwAKCRCqLAuaBUf3 Tj0SAP9ef6tLQR0p5H3Wa4JFBoL6NwpaBqgRzlWW0sfCEMadSQEAyfSMqIXMMcm/ Vmc2MAOuCUCULkUk9FpVMvcq0AFQIgE= =rZJC -----END PGP SIGNATURE-----