Skip to content

Commit

Permalink
Always return prop names, even when invalid
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiker committed Mar 8, 2024
1 parent a05202c commit 9cbb316
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions das2/property.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,12 +307,14 @@ bool DasProp_isSet(const DasProp* pProp){
return ((uint32_t)pProp->flags & DASPROP_SET);
}

/*
const char* DasProp_name(const DasProp* pProp)
{
if(! (pProp->flags & DASPROP_MULTI_MASK))
return NULL;
return pProp->buffer;
}
*/

const char* DasProp_value(const DasProp* pProp)
{
Expand Down
4 changes: 3 additions & 1 deletion das2/property.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ size_t DasProp_size(const DasProp* pProp);
/** Get name of a property
* @memberof DasProp
*/
const char* DasProp_name(const DasProp* pProp);
#define DasProp_name(P) ((P)->buffer)

/* const char* DasProp_name(const DasProp* pProp); */

/** Get the string value for a property
* @memberof DasProp
Expand Down

0 comments on commit 9cbb316

Please sign in to comment.