pike.git/
src/
stralloc.c
Branch:
Tag:
Non-build tags
All tags
No tags
2013-06-02
2013-06-02 22:44:11 by Martin Nilsson <nilsson@opera.com>
f3b33dd62d3aa920ee66270d1bef90c20e53168f (
20
lines) (+
5
/-
15
)
[
Show
|
Annotate
]
Branch:
7.9
A but more compact logic code.
2063:
else ret->flags &= ~STRING_CONTENT_CHECKED;
-
if( (aflags & STRING_IS_LOWERCASE) && (b
->flags
&
STRING_IS_LOWERCASE
)
)
-
ret->flags
|
=
STRING_IS_
LOWERCASE;
-
else
-
ret->flags &= ~STRING_IS_LOWERCASE;
-
-
if
(
(
aflags &
STRING_IS_UPPERCASE) && (
b->flags
& STRING_IS_UPPERCASE
)
)
-
ret->flags |= STRING_IS_UPPERCASE
;
-
else
-
ret->flags &= ~STRING_IS_UPPERCASE;
+
ret
->flags
=
~(
STRING_IS_LOWERCASE | STRING_IS_
UPPERCASE)
|
+
(aflags & b->flags);
} PMOD_EXPORT void update_flags_for_add( struct pike_string *a, struct pike_string *b) {
-
+
int foo=0;
if( !b->len ) return; if( a->flags & STRING_CONTENT_CHECKED ) {
2088:
a->flags &= ~STRING_CONTENT_CHECKED; }
-
if( (
a->flags &
STRING_IS_LOWERCASE) && !(b->flags & STRING_IS_LOWERCASE) )
-
a->flags &
= ~STRING_IS_LOWERCASE
;
-
-
if( (a->flags &
STRING_IS_UPPERCASE)
&&
!(
b->flags
& STRING_IS_UPPERCASE) )
-
a->flags &= ~STRING_IS_UPPERCASE
;
-
+
a->flags &= ~
(
STRING_IS_LOWERCASE
|
STRING_IS_UPPERCASE)
|
b->flags;
} /*** Add strings ***/