pike.git/
src/
pike_types.c
Branch:
Tag:
Non-build tags
All tags
No tags
1999-02-12
1999-02-12 01:15:50 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
8bd21667ed8eb07459e12166ca0fa13a405ddf50 (
27
lines) (+
14
/-
13
)
[
Show
|
Annotate
]
Branch:
7.9
minor, minor optimization
Rev: src/pike_types.c:1.51
4:
||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h"
-
RCSID("$Id: pike_types.c,v 1.
50
1999/02/
10
21
:
46
:
48
hubbe Exp $");
+
RCSID("$Id: pike_types.c,v 1.
51
1999/02/
12
01
:
15
:
50
hubbe Exp $");
#include <ctype.h> #include "svalue.h" #include "pike_types.h"
102:
void init_types(void) {
-
string
_
type
_string
=parse
_
type
(
"string"
)
;
-
int
_type_string=
parse_type
(
"int"
);
-
object
_type_string=
parse_type
(
"object"
);
-
program
_type_string=
parse_type
(
"program"
);
-
float_type_string=
parse_type
(
"float"
);
-
mixed_type_string=
parse_type
(
"mixed"
);
-
array_type_string=
parse_type
(
"array"
);
-
multiset_type_string=
parse_type
(
"multiset"
);
-
mapping_type_string=
parse_type
(
"mapping"
);
-
function_type_string=
parse_type
(
"function"
);
-
void_type_string=
parse_type
(
"void"
);
-
any_type_string=
parse_type
(
"void|mixed"
);
+
#define
CONSTTYPE(X)
make
_
shared
_
binary_
string
(X,CONSTANT
_
STRLEN
(
X
)
)
+
string
_type_string
=
CONSTTYPE
(
tString
);
+
int
_type_string
=
CONSTTYPE
(
tInt
);
+
object
_type_string
=
CONSTTYPE
(
tObj
);
+
float_type_string
=
CONSTTYPE
(
tFloat
);
+
mixed_type_string=
CONSTTYPE
(
tMix
);
+
array_type_string=
CONSTTYPE
(
tArray
);
+
multiset_type_string=
CONSTTYPE
(
tMultiset
);
+
mapping_type_string=
CONSTTYPE
(
tMapping
);
+
function_type_string=
CONSTTYPE
(
tFunction
);
+
void_type_string=
CONSTTYPE
(
tVoid
);
+
any_type_string=
CONSTTYPE
(
tOr(tVoid,tMix
)
)
;
} static int type_length(char *t)