pike.git
/
src
/
svalue.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/svalue.h:353:
extern PMOD_EXPORT const struct svalue svalue_undefined, svalue_int_zero, svalue_int_one; #define is_gt(a,b) is_lt(b,a) #define is_ge(a,b) is_le(b,a) /* SAFE_IS_ZERO is compatible with the old IS_ZERO, but you should * consider using UNSAFE_IS_ZERO instead, since exceptions thrown from * `! functions will be propagated correctly then. */
-
#define UNSAFE_IS_ZERO(X) (TYPEOF(*(X))==PIKE_T_INT?(X)->u.integer==0:(1<<TYPEOF(*(X)))&(BIT_OBJECT|BIT_FUNCTION)?!svalue_is_true(X):0)
+
#define UNSAFE_IS_ZERO(X) (TYPEOF(*(X))==PIKE_T_INT?(X)->u.integer==0:(1<<TYPEOF(*(X)))&(BIT_OBJECT|BIT_FUNCTION)?!
complex_
svalue_is_true(X):0)
#define SAFE_IS_ZERO(X) (TYPEOF(*(X))==PIKE_T_INT?(X)->u.integer==0:(1<<TYPEOF(*(X)))&(BIT_OBJECT|BIT_FUNCTION)?!safe_svalue_is_true(X):0) #define IS_UNDEFINED(X) (check_svalue (X), TYPEOF(*(X))==PIKE_T_INT&&SUBTYPEOF(*(X))==NUMBER_UNDEFINED) #define IS_DESTRUCTED(X) \ (((TYPEOF(*(X)) == PIKE_T_OBJECT) || \ ((TYPEOF(*(X))==PIKE_T_FUNCTION) && \ (SUBTYPEOF(*(X)) != FUNCTION_BUILTIN))) && !(X)->u.object->prog) #define check_destructed(S) \
pike.git/src/svalue.h:767:
PMOD_EXPORT void assign_from_short_svalue_no_free(struct svalue *s, const union anything *u, TYPE_T type); PMOD_EXPORT void assign_short_svalue_no_free(union anything *to, const union anything *from, TYPE_T type); PMOD_EXPORT void assign_short_svalue(union anything *to, const union anything *from, TYPE_T type); PMOD_EXPORT unsigned INT32 hash_svalue(const struct svalue *s);
+
PMOD_EXPORT int complex_svalue_is_true(const struct svalue *s); /* only handles object + function */
PMOD_EXPORT int svalue_is_true(const struct svalue *s); PMOD_EXPORT int safe_svalue_is_true(const struct svalue *s); PMOD_EXPORT int is_identical(const struct svalue *a, const struct svalue *b); PMOD_EXPORT int is_eq(const struct svalue *a, const struct svalue *b); PMOD_EXPORT int low_is_equal(const struct svalue *a, const struct svalue *b, struct processing *p); PMOD_EXPORT int low_short_is_equal(const union anything *a, const union anything *b, TYPE_T type,