Make nstr_exec_val() more robust
Oops on bad argument, and make a better error value then.
This commit is contained in:
parent
422cd52209
commit
0bcb047806
2 changed files with 14 additions and 11 deletions
|
@ -67,6 +67,9 @@ typedef enum {
|
|||
} nsc_type;
|
||||
typedef char packed_nsc_type;
|
||||
|
||||
/* Is TYPE a promoted value type? */
|
||||
#define NSC_IS_PROMOTED(type) (NSC_LONG <= (type) && (type) <= NSC_STRING)
|
||||
|
||||
/* Return nsc_type for a signed integer with the same size as TYPE. */
|
||||
#define NSC_SITYPE(type) \
|
||||
(sizeof(type) == 1 ? NSC_CHAR \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue