Make nstr_exec_val() more robust

Oops on bad argument, and make a better error value then.
This commit is contained in:
Markus Armbruster 2008-03-04 07:55:32 +01:00
parent 422cd52209
commit 0bcb047806
2 changed files with 14 additions and 11 deletions

View file

@ -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 \