[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cdef_property class
From: |
Rik |
Subject: |
cdef_property class |
Date: |
Thu, 7 Mar 2019 15:18:15 -0800 |
3/7/19
I was trying to fix bug #55766: properties function should not return
Hidden properties. Looking at the properties() function in ov-classdef.cc
there is a simple for loop over the properties of the class and any
non-public properties are rejected.
for (const auto& pname_prop : property_map)
{
octave_value acc = pname_prop.second.get ("GetAccess");
if (! acc.is_string () || acc.string_value () != "public")
continue;
}
So I thought this would be easy and I added to the above.
bool hid = pname_prop.second.get ("Hidden").bool_value ();
if (hid)
continue;
At runtime, however, I get a nasty error about not being able to take a
bool_value on a type of 'sq_string'.
This is odd, so for debugging I added
octave_value hid = pname_prop.second.get ("Hidden");
std::cerr << hid.string_value () << std::endl;
Now, for a classdef file that contains
properties (Hidden = true)
I find that the string is
/home/rik/.octavepkg
Does anyone know how this is supposed to work?
--Rik
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- cdef_property class,
Rik <=