]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/compiler/cpp/src/thrift/common.cc
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / jaegertracing / thrift / compiler / cpp / src / thrift / common.cc
CommitLineData
f67539c2
TL
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#include "thrift/common.h"
21#include "thrift/parse/t_base_type.h"
22
23t_type* g_type_void;
24t_type* g_type_string;
25t_type* g_type_binary;
26t_type* g_type_slist;
27t_type* g_type_bool;
28t_type* g_type_i8;
29t_type* g_type_i16;
30t_type* g_type_i32;
31t_type* g_type_i64;
32t_type* g_type_double;
33
34void initGlobals() {
35 g_type_void = new t_base_type("void", t_base_type::TYPE_VOID);
36 g_type_string = new t_base_type("string", t_base_type::TYPE_STRING);
37 g_type_binary = new t_base_type("string", t_base_type::TYPE_STRING);
38 ((t_base_type*)g_type_binary)->set_binary(true);
39 g_type_slist = new t_base_type("string", t_base_type::TYPE_STRING);
40 ((t_base_type*)g_type_slist)->set_string_list(true);
41 g_type_bool = new t_base_type("bool", t_base_type::TYPE_BOOL);
42 g_type_i8 = new t_base_type("i8", t_base_type::TYPE_I8);
43 g_type_i16 = new t_base_type("i16", t_base_type::TYPE_I16);
44 g_type_i32 = new t_base_type("i32", t_base_type::TYPE_I32);
45 g_type_i64 = new t_base_type("i64", t_base_type::TYPE_I64);
46 g_type_double = new t_base_type("double", t_base_type::TYPE_DOUBLE);
47}
48
49void clearGlobals() {
50 delete g_type_void;
51 delete g_type_string;
52 delete g_type_bool;
53 delete g_type_i8;
54 delete g_type_i16;
55 delete g_type_i32;
56 delete g_type_i64;
57 delete g_type_double;
58}
59
60/**
61 * The location of the last parsed doctext comment.
62 */
63int g_doctext_lineno;
64int g_program_doctext_lineno = 0;
65PROGDOCTEXT_STATUS g_program_doctext_status = INVALID;