Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
B
brpc
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
brpc
Commits
ef4eddde
Commit
ef4eddde
authored
Nov 03, 2017
by
gejun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unify inclusion guards
parent
09cc273d
Show whitespace changes
Inline
Side-by-side
Showing
62 changed files
with
186 additions
and
186 deletions
+186
-186
bthread.h
src/bthread/bthread.h
+3
-3
butex.h
src/bthread/butex.h
+3
-3
comlog_initializer.h
src/bthread/comlog_initializer.h
+3
-3
countdown_event.h
src/bthread/countdown_event.h
+3
-3
errno.h
src/bthread/errno.h
+3
-3
id.h
src/bthread/id.h
+3
-3
interrupt_pthread.h
src/bthread/interrupt_pthread.h
+3
-3
list_of_abafree_id.h
src/bthread/list_of_abafree_id.h
+3
-3
log.h
src/bthread/log.h
+3
-3
parking_lot.h
src/bthread/parking_lot.h
+3
-3
processor.h
src/bthread/processor.h
+3
-3
remote_task_queue.h
src/bthread/remote_task_queue.h
+3
-3
stack.h
src/bthread/stack.h
+3
-3
stack_inl.h
src/bthread/stack_inl.h
+3
-3
sys_futex.h
src/bthread/sys_futex.h
+3
-3
task_control.h
src/bthread/task_control.h
+3
-3
task_group.h
src/bthread/task_group.h
+3
-3
task_group_inl.h
src/bthread/task_group_inl.h
+3
-3
task_meta.h
src/bthread/task_meta.h
+3
-3
timer_thread.h
src/bthread/timer_thread.h
+3
-3
types.h
src/bthread/types.h
+3
-3
unstable.h
src/bthread/unstable.h
+3
-3
work_stealing_queue.h
src/bthread/work_stealing_queue.h
+3
-3
arena.h
src/butil/arena.h
+3
-3
class_name.h
src/butil/class_name.h
+3
-3
endpoint.h
src/butil/endpoint.h
+3
-3
errno.h
src/butil/errno.h
+3
-3
fast_rand.h
src/butil/fast_rand.h
+3
-3
fd_guard.h
src/butil/fd_guard.h
+3
-3
fd_utility.h
src/butil/fd_utility.h
+3
-3
find_cstr.h
src/butil/find_cstr.h
+3
-3
intrusive_ptr.hpp
src/butil/intrusive_ptr.hpp
+3
-3
scoped_lock.h
src/butil/scoped_lock.h
+3
-3
ssl_compat.h
src/butil/ssl_compat.h
+3
-3
status.h
src/butil/status.h
+3
-3
string_printf.h
src/butil/string_printf.h
+3
-3
string_splitter.h
src/butil/string_splitter.h
+3
-3
string_splitter_inl.h
src/butil/string_splitter_inl.h
+3
-3
synchronous_event.h
src/butil/synchronous_event.h
+3
-3
murmurhash3.h
src/butil/third_party/murmurhash3/murmurhash3.h
+3
-3
snappy-internal.h
src/butil/third_party/snappy/snappy-internal.h
+3
-3
snappy-sinksource.h
src/butil/third_party/snappy/snappy-sinksource.h
+3
-3
snappy-stubs-internal.h
src/butil/third_party/snappy/snappy-stubs-internal.h
+3
-3
snappy.h
src/butil/third_party/snappy/snappy.h
+3
-3
thread_local.h
src/butil/thread_local.h
+3
-3
thread_local_inl.h
src/butil/thread_local_inl.h
+3
-3
time.h
src/butil/time.h
+3
-3
unique_ptr.h
src/butil/unique_ptr.h
+3
-3
unix_socket.h
src/butil/unix_socket.h
+3
-3
zero_copy_stream_as_streambuf.h
src/butil/zero_copy_stream_as_streambuf.h
+3
-3
collector.h
src/bvar/collector.h
+3
-3
combiner.h
src/bvar/detail/combiner.h
+3
-3
encode_decode.h
src/json2pb/encode_decode.h
+3
-3
rapidjson.h
src/json2pb/rapidjson.h
+3
-3
zero_copy_stream_reader.h
src/json2pb/zero_copy_stream_reader.h
+3
-3
zero_copy_stream_writer.h
src/json2pb/zero_copy_stream_writer.h
+3
-3
field_type.h
src/mcpack2pb/field_type.h
+3
-3
mcpack2pb.h
src/mcpack2pb/mcpack2pb.h
+3
-3
parser-inl.h
src/mcpack2pb/parser-inl.h
+3
-3
parser.h
src/mcpack2pb/parser.h
+3
-3
serializer-inl.h
src/mcpack2pb/serializer-inl.h
+3
-3
serializer.h
src/mcpack2pb/serializer.h
+3
-3
No files found.
src/bthread/bthread.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_BTHREAD_H
#define B
AIDU_B
THREAD_BTHREAD_H
#ifndef BTHREAD_BTHREAD_H
#define BTHREAD_BTHREAD_H
#include <pthread.h>
#include <sys/socket.h>
...
...
@@ -326,4 +326,4 @@ extern void* bthread_getspecific(bthread_key_t key) __THROW;
__END_DECLS
#endif // B
AIDU_B
THREAD_BTHREAD_H
#endif // BTHREAD_BTHREAD_H
src/bthread/butex.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 22 17:30:12 CST 2014
#ifndef B
AIDU_B
THREAD_BUTEX_H
#define B
AIDU_B
THREAD_BUTEX_H
#ifndef BTHREAD_BUTEX_H
#define BTHREAD_BUTEX_H
#include <errno.h> // users need to check errno
#include <time.h> // timespec
...
...
@@ -69,4 +69,4 @@ int butex_wait(void* butex, int expected_value, const timespec* abstime);
}
// namespace bthread
#endif // B
AIDU_B
THREAD_BUTEX_H
#endif // BTHREAD_BUTEX_H
src/bthread/comlog_initializer.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Sep 15 10:51:15 CST 2014
#ifndef
PUBLIC_BTHREAD_
BTHREAD_COMLOG_INITIALIZER_H
#define
PUBLIC_BTHREAD_
BTHREAD_COMLOG_INITIALIZER_H
#ifndef BTHREAD_COMLOG_INITIALIZER_H
#define BTHREAD_COMLOG_INITIALIZER_H
#include <com_log.h> // com_openlog_r, com_closelog_r
#include <butil/macros.h>
...
...
@@ -43,4 +43,4 @@ private:
}
#endif //
PUBLIC_BTHREAD_
BTHREAD_COMLOG_INITIALIZER_H
#endif // BTHREAD_COMLOG_INITIALIZER_H
src/bthread/countdown_event.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2016/06/03 13:06:40
#ifndef
PUBLIC_
BTHREAD_COUNTDOWN_EVENT_H
#define
PUBLIC_
BTHREAD_COUNTDOWN_EVENT_H
#ifndef BTHREAD_COUNTDOWN_EVENT_H
#define BTHREAD_COUNTDOWN_EVENT_H
#include "bthread/bthread.h"
...
...
@@ -55,4 +55,4 @@ private:
}
// namespace bthread
#endif //
PUBLIC_
BTHREAD_COUNTDOWN_EVENT_H
#endif //
BTHREAD_COUNTDOWN_EVENT_H
src/bthread/errno.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Wed Jul 30 11:47:19 CST 2014
#ifndef B
AIDU_B
THREAD_ERRNO_H
#define B
AIDU_B
THREAD_ERRNO_H
#ifndef BTHREAD_ERRNO_H
#define BTHREAD_ERRNO_H
#include <errno.h> // errno
#include "butil/errno.h" // berror(), DEFINE_BTHREAD_ERRNO
...
...
@@ -36,4 +36,4 @@ extern const int ESTOP;
__END_DECLS
#endif //B
AIDU_B
THREAD_ERRNO_H
#endif //BTHREAD_ERRNO_H
src/bthread/id.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_BTHREAD_B
THREAD_ID_H
#define B
AIDU_BTHREAD_B
THREAD_ID_H
#ifndef BTHREAD_ID_H
#define BTHREAD_ID_H
#include "butil/macros.h" // BAIDU_SYMBOLSTR
#include "bthread/types.h"
...
...
@@ -187,4 +187,4 @@ int bthread_id_list_reset2_bthreadsafe(bthread_id_list_t* list, int error_code,
bthread_mutex_t
*
mutex
)
__THROW
;
#endif
#endif // B
AIDU_BTHREAD_B
THREAD_ID_H
#endif // BTHREAD_ID_H
src/bthread/interrupt_pthread.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_INTERRUPT_PTHREAD_H
#define B
AIDU_B
THREAD_INTERRUPT_PTHREAD_H
#ifndef BTHREAD_INTERRUPT_PTHREAD_H
#define BTHREAD_INTERRUPT_PTHREAD_H
#include <pthread.h>
...
...
@@ -29,4 +29,4 @@ int interrupt_pthread(pthread_t th);
}
// namespace bthread
#endif // B
AIDU_B
THREAD_INTERRUPT_PTHREAD_H
#endif // BTHREAD_INTERRUPT_PTHREAD_H
src/bthread/list_of_abafree_id.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Jun 20 11:57:23 CST 2016
#ifndef B
AIDU_B
THREAD_LIST_OF_ABAFREE_ID_H
#define B
AIDU_B
THREAD_LIST_OF_ABAFREE_ID_H
#ifndef BTHREAD_LIST_OF_ABAFREE_ID_H
#define BTHREAD_LIST_OF_ABAFREE_ID_H
#include <vector>
#include <deque>
...
...
@@ -209,4 +209,4 @@ size_t ListOfABAFreeId<Id, IdTraits>::get_sizes(size_t* cnts, size_t n) {
}
// namespace bthread
#endif // B
AIDU_B
THREAD_LIST_OF_ABAFREE_ID_H
#endif // BTHREAD_LIST_OF_ABAFREE_ID_H
src/bthread/log.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Sep 15 10:51:15 CST 2014
#ifndef B
AIDU_B
THREAD_LOG_H
#define B
AIDU_B
THREAD_LOG_H
#ifndef BTHREAD_LOG_H
#define BTHREAD_LOG_H
#ifdef BAIDU_INTERNAL
#include "bthread/comlog_initializer.h"
...
...
@@ -25,4 +25,4 @@
#define BT_VLOG VLOG(100)
#endif // B
AIDU_B
THREAD_LOG_H
#endif // BTHREAD_LOG_H
src/bthread/parking_lot.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: chenzhangyi01@baidu.com, gejun@baidu.com
// Date: 2017/07/27 23:07:06
#ifndef
PUBLIC_
BTHREAD_PARKING_LOT_H
#define
PUBLIC_
BTHREAD_PARKING_LOT_H
#ifndef BTHREAD_PARKING_LOT_H
#define BTHREAD_PARKING_LOT_H
#include "butil/atomicops.h"
#include "bthread/sys_futex.h"
...
...
@@ -69,4 +69,4 @@ private:
}
// namespace bthread
#endif //
PUBLIC_
BTHREAD_PARKING_LOT_H
#endif //
BTHREAD_PARKING_LOT_H
src/bthread/processor.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Fri Dec 5 13:40:57 CST 2014
#ifndef B
AIDU_B
THREAD_PROCESSOR_H
#define B
AIDU_B
THREAD_PROCESSOR_H
#ifndef BTHREAD_PROCESSOR_H
#define BTHREAD_PROCESSOR_H
// Pause instruction to prevent excess processor bus usage, only works in GCC
# ifndef cpu_relax
...
...
@@ -44,4 +44,4 @@
errno = saved_errno; \
} while (0)
#endif // B
AIDU_B
THREAD_PROCESSOR_H
#endif // BTHREAD_PROCESSOR_H
src/bthread/remote_task_queue.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun, 22 Jan 2017
#ifndef B
AIDU_B
THREAD_REMOTE_TASK_QUEUE_H
#define B
AIDU_B
THREAD_REMOTE_TASK_QUEUE_H
#ifndef BTHREAD_REMOTE_TASK_QUEUE_H
#define BTHREAD_REMOTE_TASK_QUEUE_H
#include "butil/containers/bounded_queue.h"
#include "butil/macros.h"
...
...
@@ -77,4 +77,4 @@ friend class TaskGroup;
}
// namespace bthread
#endif // B
AIDU_B
THREAD_REMOTE_TASK_QUEUE_H
#endif // BTHREAD_REMOTE_TASK_QUEUE_H
src/bthread/stack.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Sep 7 22:37:39 CST 2014
#ifndef B
AIDU_B
THREAD_ALLOCATE_STACK_H
#define B
AIDU_B
THREAD_ALLOCATE_STACK_H
#ifndef BTHREAD_ALLOCATE_STACK_H
#define BTHREAD_ALLOCATE_STACK_H
#include <assert.h>
#include <gflags/gflags.h> // DECLARE_int32
...
...
@@ -77,4 +77,4 @@ void jump_stack(ContextualStack* from, ContextualStack* to);
#include "bthread/stack_inl.h"
#endif // B
AIDU_B
THREAD_ALLOCATE_STACK_H
#endif // BTHREAD_ALLOCATE_STACK_H
src/bthread/stack_inl.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Sep 7 22:37:39 CST 2014
#ifndef B
AIDU_B
THREAD_ALLOCATE_STACK_INL_H
#define B
AIDU_B
THREAD_ALLOCATE_STACK_INL_H
#ifndef BTHREAD_ALLOCATE_STACK_INL_H
#define BTHREAD_ALLOCATE_STACK_INL_H
DECLARE_int32
(
guard_page_size
);
DECLARE_int32
(
tc_stack_small
);
...
...
@@ -192,4 +192,4 @@ template <> struct ObjectPoolValidator<
}
// namespace butil
#endif // B
AIDU_B
THREAD_ALLOCATE_STACK_INL_H
#endif // BTHREAD_ALLOCATE_STACK_INL_H
src/bthread/sys_futex.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_SYS_FUTEX_H
#define B
AIDU_B
THREAD_SYS_FUTEX_H
#ifndef BTHREAD_SYS_FUTEX_H
#define BTHREAD_SYS_FUTEX_H
#include <syscall.h> // SYS_futex
#include <unistd.h> // syscall
...
...
@@ -46,4 +46,4 @@ inline int futex_requeue_private(void* addr1, int nwake, void* addr2) {
}
// namespace bthread
#endif // B
AIDU_B
THREAD_SYS_FUTEX_H
#endif // BTHREAD_SYS_FUTEX_H
src/bthread/task_control.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_TASK_CONTROL_H
#define B
AIDU_B
THREAD_TASK_CONTROL_H
#ifndef BTHREAD_TASK_CONTROL_H
#define BTHREAD_TASK_CONTROL_H
#ifndef NDEBUG
#include <iostream> // std::ostream
...
...
@@ -122,4 +122,4 @@ inline bvar::LatencyRecorder& TaskControl::exposed_pending_time() {
}
// namespace bthread
#endif // B
AIDU_B
THREAD_TASK_CONTROL_H
#endif // BTHREAD_TASK_CONTROL_H
src/bthread/task_group.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_TASK_GROUP_H
#define B
AIDU_B
THREAD_TASK_GROUP_H
#ifndef BTHREAD_TASK_GROUP_H
#define BTHREAD_TASK_GROUP_H
#include "butil/time.h" // cpuwide_time_ns
#include "bthread/task_control.h"
...
...
@@ -250,4 +250,4 @@ friend class TaskControl;
#include "task_group_inl.h"
#endif // B
AIDU_B
THREAD_TASK_GROUP_H
#endif // BTHREAD_TASK_GROUP_H
src/bthread/task_group_inl.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_TASK_GROUP_INL_H
#define B
AIDU_B
THREAD_TASK_GROUP_INL_H
#ifndef BTHREAD_TASK_GROUP_INL_H
#define BTHREAD_TASK_GROUP_INL_H
namespace
bthread
{
...
...
@@ -103,4 +103,4 @@ inline void TaskGroup::flush_nosignal_tasks_remote() {
}
// namespace bthread
#endif // B
AIDU_B
THREAD_TASK_GROUP_INL_H
#endif // BTHREAD_TASK_GROUP_INL_H
src/bthread/task_meta.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_TASK_META_H
#define B
AIDU_B
THREAD_TASK_META_H
#ifndef BTHREAD_TASK_META_H
#define BTHREAD_TASK_META_H
#include <pthread.h> // pthread_spin_init
#include "bthread/butex.h" // butex_construct/destruct
...
...
@@ -121,4 +121,4 @@ public:
}
// namespace bthread
#endif // B
AIDU_B
THREAD_TASK_META_H
#endif // BTHREAD_TASK_META_H
src/bthread/timer_thread.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
#ifndef B
AIDU_B
THREAD_TIMER_THREAD_H
#define B
AIDU_B
THREAD_TIMER_THREAD_H
#ifndef BTHREAD_TIMER_THREAD_H
#define BTHREAD_TIMER_THREAD_H
#include <vector> // std::vector
#include <pthread.h> // pthread_*
...
...
@@ -106,4 +106,4 @@ TimerThread* get_global_timer_thread();
}
// end namespace bthread
#endif // B
AIDU_B
THREAD_TIMER_THREAD_H
#endif // BTHREAD_TIMER_THREAD_H
src/bthread/types.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_BTHREAD_B
THREAD_TYPES_H
#define B
AIDU_BTHREAD_B
THREAD_TYPES_H
#ifndef BTHREAD_TYPES_H
#define BTHREAD_TYPES_H
#include <stdint.h> // uint64_t
#if defined(__cplusplus)
...
...
@@ -220,4 +220,4 @@ typedef struct {
typedef
uint64_t
bthread_timer_t
;
#endif // B
AIDU_BTHREAD_B
THREAD_TYPES_H
#endif // BTHREAD_TYPES_H
src/bthread/unstable.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_BTHREAD_B
THREAD_UNSTABLE_H
#define B
AIDU_BTHREAD_B
THREAD_UNSTABLE_H
#ifndef BTHREAD_UNSTABLE_H
#define BTHREAD_UNSTABLE_H
#include <pthread.h>
#include <sys/socket.h>
...
...
@@ -124,4 +124,4 @@ extern void bthread_keytable_pool_reserve(
__END_DECLS
#endif // B
AIDU_BTHREAD_B
THREAD_UNSTABLE_H
#endif // BTHREAD_UNSTABLE_H
src/bthread/work_stealing_queue.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jul 10 17:40:58 CST 2012
#ifndef B
AIDU_B
THREAD_WORK_STEALING_QUEUE_H
#define B
AIDU_B
THREAD_WORK_STEALING_QUEUE_H
#ifndef BTHREAD_WORK_STEALING_QUEUE_H
#define BTHREAD_WORK_STEALING_QUEUE_H
#include "butil/macros.h"
#include "butil/atomicops.h"
...
...
@@ -151,4 +151,4 @@ private:
}
// namespace bthread
#endif // B
AIDU_B
THREAD_WORK_STEALING_QUEUE_H
#endif // BTHREAD_WORK_STEALING_QUEUE_H
src/butil/arena.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Do small memory allocations on continuous blocks.
#ifndef B
AIDU_BASE
_ARENA_H
#define B
AIDU_BASE
_ARENA_H
#ifndef B
UTIL
_ARENA_H
#define B
UTIL
_ARENA_H
#include <stdint.h>
#include "butil/macros.h"
...
...
@@ -80,4 +80,4 @@ inline void* Arena::allocate(size_t n) {
}
// namespace butil
#endif // B
AIDU_BASE
_ARENA_H
#endif // B
UTIL
_ARENA_H
src/butil/class_name.h
View file @
ef4eddde
...
...
@@ -18,8 +18,8 @@
// Get name of a class. For example, class_name<T>() returns the name of T
// (with namespace prefixes). This is useful in template classes.
#ifndef B
AIDU_BASE
_CLASS_NAME_H
#define B
AIDU_BASE
_CLASS_NAME_H
#ifndef B
UTIL
_CLASS_NAME_H
#define B
UTIL
_CLASS_NAME_H
#include <typeinfo>
#include <string> // std::string
...
...
@@ -53,4 +53,4 @@ template <typename T> std::string class_name_str(T const& obj) {
}
// namespace butil
#endif // B
AIDU_BASE
_CLASS_NAME_H
#endif // B
UTIL
_CLASS_NAME_H
src/butil/endpoint.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Wrappers of IP and port.
#ifndef B
AIDU_BASE
_ENDPOINT_H
#define B
AIDU_BASE
_ENDPOINT_H
#ifndef B
UTIL
_ENDPOINT_H
#define B
UTIL
_ENDPOINT_H
#include <netinet/in.h> // in_addr
#include <iostream> // std::ostream
...
...
@@ -216,4 +216,4 @@ struct hash<butil::EndPoint> {
}
#endif // B
AIDU_BASE
_ENDPOINT_H
#endif // B
UTIL
_ENDPOINT_H
src/butil/errno.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Add customized errno.
#ifndef B
AIDU_BASE
_BAIDU_ERRNO_H
#define B
AIDU_BASE
_BAIDU_ERRNO_H
#ifndef B
UTIL
_BAIDU_ERRNO_H
#define B
UTIL
_BAIDU_ERRNO_H
#define __const__
#include <errno.h> // errno
...
...
@@ -77,4 +77,4 @@ template <int error_code> class BaiduErrnoHelper {};
const
char
*
berror
(
int
error_code
);
const
char
*
berror
();
#endif //B
AIDU_BASE
_BAIDU_ERRNO_H
#endif //B
UTIL
_BAIDU_ERRNO_H
src/butil/fast_rand.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Thu Dec 31 13:35:39 CST 2015
#ifndef
PUBLIC_COMMON_BASE
_FAST_RAND_H
#define
PUBLIC_COMMON_BASE
_FAST_RAND_H
#ifndef
BUTIL
_FAST_RAND_H
#define
BUTIL
_FAST_RAND_H
#include <stdint.h>
...
...
@@ -65,4 +65,4 @@ double fast_rand_double();
}
#endif //
PUBLIC_COMMON_BASE
_FAST_RAND_H
#endif //
BUTIL
_FAST_RAND_H
src/butil/fd_guard.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef B
AIDU_BASE
_FD_GUARD_H
#define B
AIDU_BASE
_FD_GUARD_H
#ifndef B
UTIL
_FD_GUARD_H
#define B
UTIL
_FD_GUARD_H
#include <unistd.h> // close()
...
...
@@ -74,4 +74,4 @@ private:
}
// namespace butil
#endif // B
AIDU_BASE
_FD_GUARD_H
#endif // B
UTIL
_FD_GUARD_H
src/butil/fd_utility.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Utility functions on file descriptor.
#ifndef B
AIDU_BASE
_FD_UTILITY_H
#define B
AIDU_BASE
_FD_UTILITY_H
#ifndef B
UTIL
_FD_UTILITY_H
#define B
UTIL
_FD_UTILITY_H
namespace
butil
{
...
...
@@ -40,4 +40,4 @@ int make_no_delay(int socket);
}
// namespace butil
#endif // B
AIDU_BASE
_FD_UTILITY_H
#endif // B
UTIL
_FD_UTILITY_H
src/butil/find_cstr.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Jun 23 15:03:24 CST 2015
#ifndef B
AIDU_BASE
_FIND_CSTR_H
#define B
AIDU_BASE
_FIND_CSTR_H
#ifndef B
UTIL
_FIND_CSTR_H
#define B
UTIL
_FIND_CSTR_H
#include <string>
#include <map>
...
...
@@ -149,4 +149,4 @@ find_lowered_cstr(std::map<std::string, T, C, A>& m,
}
// namespace butil
#endif // B
AIDU_BASE
_FIND_CSTR_H
#endif // B
UTIL
_FIND_CSTR_H
src/butil/intrusive_ptr.hpp
View file @
ef4eddde
#ifndef
PUBLIC_COMMON_BASE
_INTRUSIVE_PTR_HPP
#define
PUBLIC_COMMON_BASE
_INTRUSIVE_PTR_HPP
#ifndef
BUTIL
_INTRUSIVE_PTR_HPP
#define
BUTIL
_INTRUSIVE_PTR_HPP
// Copyright (c) 2001, 2002 Peter Dimov
//
...
...
@@ -293,4 +293,4 @@ inline size_t hash_value(const butil::intrusive_ptr<T>& sp) {
}
// namespace BASE_HASH_NAMESPACE
#endif //
PUBLIC_COMMON_BASE
_INTRUSIVE_PTR_HPP
#endif //
BUTIL
_INTRUSIVE_PTR_HPP
src/butil/scoped_lock.h
View file @
ef4eddde
...
...
@@ -14,8 +14,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef B
AIDU_BASE
_BAIDU_SCOPED_LOCK_H
#define B
AIDU_BASE
_BAIDU_SCOPED_LOCK_H
#ifndef B
UTIL
_BAIDU_SCOPED_LOCK_H
#define B
UTIL
_BAIDU_SCOPED_LOCK_H
#include "butil/build_config.h"
...
...
@@ -396,4 +396,4 @@ void double_lock(std::unique_lock<Mutex1> &lck1, std::unique_lock<Mutex2> &lck2)
};
#endif // B
AIDU_BASE
_BAIDU_SCOPED_LOCK_H
#endif // B
UTIL
_BAIDU_SCOPED_LOCK_H
src/butil/ssl_compat.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
Date: Sun Aug 20 11:39:01 CST 2017
*/
#ifndef B
AIDU_BASE
_SSL_COMPAT_H
#define B
AIDU_BASE
_SSL_COMPAT_H
#ifndef B
UTIL
_SSL_COMPAT_H
#define B
UTIL
_SSL_COMPAT_H
#include <openssl/ssl.h>
#include <openssl/opensslv.h>
...
...
@@ -523,4 +523,4 @@ BRPC_INLINE int EVP_PKEY_base_id(const EVP_PKEY *pkey) {
#endif
/* OPENSSL_VERSION_NUMBER < 0x0090801fL */
#endif
/* B
AIDU_BASE
_SSL_COMPAT_H */
#endif
/* B
UTIL
_SSL_COMPAT_H */
src/butil/status.h
View file @
ef4eddde
// Copyright (c) 2015 Baidu, Inc.
#ifndef B
AIDU_BASE
_STATUS_H
#define B
AIDU_BASE
_STATUS_H
#ifndef B
UTIL
_STATUS_H
#define B
UTIL
_STATUS_H
#include <stdarg.h> // va_list
#include <stdlib.h> // free
...
...
@@ -139,4 +139,4 @@ inline std::ostream& operator<<(std::ostream& os, const Status& st) {
}
// namespace butil
#endif // B
AIDU_BASE
_STATUS_H
#endif // B
UTIL
_STATUS_H
src/butil/string_printf.h
View file @
ef4eddde
// Copyright (c) 2011 Baidu, Inc.
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef B
AIDU_BASE
_STRING_PRINTF_H
#define B
AIDU_BASE
_STRING_PRINTF_H
#ifndef B
UTIL
_STRING_PRINTF_H
#define B
UTIL
_STRING_PRINTF_H
#include <string> // std::string
#include <stdarg.h> // va_list
...
...
@@ -34,4 +34,4 @@ int string_vappendf(std::string* output, const char* format, va_list args);
}
// namespace butil
#endif // B
AIDU_BASE
_STRING_PRINTF_H
#endif // B
UTIL
_STRING_PRINTF_H
src/butil/string_splitter.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Iteratively split a string by one or multiple separators.
#ifndef B
AIDU_BASE
_STRING_SPLITTER_H
#define B
AIDU_BASE
_STRING_SPLITTER_H
#ifndef B
UTIL
_STRING_SPLITTER_H
#define B
UTIL
_STRING_SPLITTER_H
#include <stdlib.h>
#include <stdint.h>
...
...
@@ -159,4 +159,4 @@ private:
#include "butil/string_splitter_inl.h"
#endif // B
AIDU_BASE
_STRING_SPLITTER_H
#endif // B
UTIL
_STRING_SPLITTER_H
src/butil/string_splitter_inl.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
#include <limits.h>
#ifndef B
AIDU_BASE
_STRING_SPLITTER_INL_H
#define B
AIDU_BASE
_STRING_SPLITTER_INL_H
#ifndef B
UTIL
_STRING_SPLITTER_INL_H
#define B
UTIL
_STRING_SPLITTER_INL_H
namespace
butil
{
...
...
@@ -311,4 +311,4 @@ int StringMultiSplitter::to_double(double* pv) const {
}
// namespace butil
#endif // B
AIDU_BASE
_STRING_SPLITTER_INL_H
#endif // B
UTIL
_STRING_SPLITTER_INL_H
src/butil/synchronous_event.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Sun Nov 7 21:43:34 CST 2010
#ifndef B
AIDU_BASE
_SYNCHRONOUS_EVENT_H
#define B
AIDU_BASE
_SYNCHRONOUS_EVENT_H
#ifndef B
UTIL
_SYNCHRONOUS_EVENT_H
#define B
UTIL
_SYNCHRONOUS_EVENT_H
#include <vector> // std::vector
#include <algorithm> // std::find
...
...
@@ -228,4 +228,4 @@ public:
}
// end namespace detail
}
// end namespace butil
#endif // B
AIDU_BASE
_SYNCHRONOUS_EVENT_H
#endif // B
UTIL
_SYNCHRONOUS_EVENT_H
src/butil/third_party/murmurhash3/murmurhash3.h
View file @
ef4eddde
...
...
@@ -5,8 +5,8 @@
// Compute murmurhash3 iteratively so that you don't have to buffer
// everything in memory before computation. The APIs are similar with MD5
#ifndef
PUBLIC_COMMON_BASE
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#define
PUBLIC_COMMON_BASE
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#ifndef
BUTIL
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#define
BUTIL
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
// ======= Platform-specific functions and macros =======
// Microsoft Visual Studio
...
...
@@ -99,4 +99,4 @@ void MurmurHash3_x64_128_Final(void* out, const MurmurHash3_x64_128_Context* ctx
}
// namespace butil
#endif //
PUBLIC_COMMON_BASE
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
#endif //
BUTIL
_THIRD_PARTY_MURMURHASH3_MURMURHASH3_H
src/butil/third_party/snappy/snappy-internal.h
View file @
ef4eddde
...
...
@@ -28,8 +28,8 @@
//
// Internals shared between the Snappy implementation and its unittest.
#ifndef
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#define
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#ifndef
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#define
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#include "snappy-stubs-internal.h"
...
...
@@ -149,4 +149,4 @@ static inline int FindMatchLength(const char* s1,
}
// end namespace snappy
}
// end namespace butil
#endif //
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
#endif //
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_INTERNAL_H_
src/butil/third_party/snappy/snappy-sinksource.h
View file @
ef4eddde
...
...
@@ -26,8 +26,8 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#define
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#ifndef
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#define
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#include <stddef.h>
...
...
@@ -181,4 +181,4 @@ class UncheckedByteArraySink : public Sink {
}
// namespace snappy
}
// namespace butil
#endif //
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
#endif //
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_SINKSOURCE_H_
src/butil/third_party/snappy/snappy-stubs-internal.h
View file @
ef4eddde
...
...
@@ -28,8 +28,8 @@
//
// Various stubs for the open-source version of Snappy.
#ifndef
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#define
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#ifndef
BUTIL
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#define
BUTIL
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#include <string>
#include <assert.h>
...
...
@@ -399,4 +399,4 @@ inline char* string_as_array(std::string* str) {
}
// namespace snappy
}
// namespace butil
#endif //
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
#endif //
BUTIL
_THIRD_PARTY_SNAPPY_OPENSOURCE_SNAPPY_STUBS_INTERNAL_H_
src/butil/third_party/snappy/snappy.h
View file @
ef4eddde
...
...
@@ -36,8 +36,8 @@
// using BMDiff and then compressing the output of BMDiff with
// Snappy.
#ifndef
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_H__
#define
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_H__
#ifndef
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_H__
#define
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_H__
#include "butil/basictypes.h"
#include <string>
...
...
@@ -207,4 +207,4 @@ static const size_t kMaxHashTableSize = 1 << kMaxHashTableBits;
}
// end namespace snappy
}
// end namespace butil
#endif //
PUBLIC_COMMON_BASE
_THIRD_PARTY_SNAPPY_SNAPPY_H__
#endif //
BUTIL
_THIRD_PARTY_SNAPPY_SNAPPY_H__
src/butil/thread_local.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon. Nov 7 14:47:36 CST 2011
#ifndef B
AIDU_BASE
_THREAD_LOCAL_H
#define B
AIDU_BASE
_THREAD_LOCAL_H
#ifndef B
UTIL
_THREAD_LOCAL_H
#define B
UTIL
_THREAD_LOCAL_H
#include <new> // std::nothrow
#include <cstddef> // NULL
...
...
@@ -76,4 +76,4 @@ template <typename T> void delete_object(void* arg) {
#include "thread_local_inl.h"
#endif // B
AIDU_BASE
_THREAD_LOCAL_H
#endif // B
UTIL
_THREAD_LOCAL_H
src/butil/thread_local_inl.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Tue Sep 16 12:39:12 CST 2014
#ifndef B
AIDU_BASE
_THREAD_LOCAL_INL_H
#define B
AIDU_BASE
_THREAD_LOCAL_INL_H
#ifndef B
UTIL
_THREAD_LOCAL_INL_H
#define B
UTIL
_THREAD_LOCAL_INL_H
namespace
butil
{
...
...
@@ -48,4 +48,4 @@ template <typename T> inline T* get_thread_local() {
}
// namespace butil
#endif // B
AIDU_BASE
_THREAD_LOCAL_INL_H
#endif // B
UTIL
_THREAD_LOCAL_INL_H
src/butil/time.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Measuring time
#ifndef B
AIDU_B
UTIL_TIME_H
#define B
AIDU_B
UTIL_TIME_H
#ifndef BUTIL_TIME_H
#define BUTIL_TIME_H
#include <time.h> // timespec, clock_gettime
#include <sys/time.h> // timeval, gettimeofday
...
...
@@ -348,4 +348,4 @@ private:
}
// namespace butil
#endif // B
AIDU_B
UTIL_TIME_H
#endif // BUTIL_TIME_H
src/butil/unique_ptr.h
View file @
ef4eddde
#ifndef B
AIDU_BASE
_UNIQUE_PTR_H
#define B
AIDU_BASE
_UNIQUE_PTR_H
#ifndef B
UTIL
_UNIQUE_PTR_H
#define B
UTIL
_UNIQUE_PTR_H
#include "butil/build_config.h"
...
...
@@ -469,4 +469,4 @@ operator>=(const unique_ptr<T1, D1>& x, const unique_ptr<T2, D2>& y) {
}
// namespace std
#endif // BASE_CXX11_ENABLED
#endif // B
AIDU_BASE
_UNIQUE_PTR_H
#endif // B
UTIL
_UNIQUE_PTR_H
src/butil/unix_socket.h
View file @
ef4eddde
...
...
@@ -17,8 +17,8 @@
// Wrappers of unix domain sockets, mainly for unit-test of network stuff.
#ifndef B
AIDU_BASE
_UNIX_SOCKET_H
#define B
AIDU_BASE
_UNIX_SOCKET_H
#ifndef B
UTIL
_UNIX_SOCKET_H
#define B
UTIL
_UNIX_SOCKET_H
namespace
butil
{
...
...
@@ -36,4 +36,4 @@ int unix_socket_connect(const char* sockname);
}
// namespace butil
#endif // B
AIDU_BASE
_UNIX_SOCKET_H
#endif // B
UTIL
_UNIX_SOCKET_H
src/butil/zero_copy_stream_as_streambuf.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Thu Nov 22 13:57:56 CST 2012
#ifndef B
AIDU_BASE
_ZERO_COPY_STREAM_AS_STREAMBUF_H
#define B
AIDU_BASE
_ZERO_COPY_STREAM_AS_STREAMBUF_H
#ifndef B
UTIL
_ZERO_COPY_STREAM_AS_STREAMBUF_H
#define B
UTIL
_ZERO_COPY_STREAM_AS_STREAMBUF_H
#include <streambuf>
#include <google/protobuf/io/zero_copy_stream.h>
...
...
@@ -49,4 +49,4 @@ private:
}
// namespace butil
#endif // B
AIDU_BASE
_ZERO_COPY_STREAM_AS_STREAMBUF_H
#endif // B
UTIL
_ZERO_COPY_STREAM_AS_STREAMBUF_H
src/bvar/collector.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Dec 14 19:12:30 CST 2015
#ifndef
PUBLIC_BVAR_
BVAR_COLLECTOR_H
#define
PUBLIC_BVAR_
BVAR_COLLECTOR_H
#ifndef BVAR_COLLECTOR_H
#define BVAR_COLLECTOR_H
#include "butil/containers/linked_list.h"
#include "butil/fast_rand.h"
...
...
@@ -132,4 +132,4 @@ private:
}
// namespace bvar
#endif //
PUBLIC_BVAR_
BVAR_COLLECTOR_H
#endif // BVAR_COLLECTOR_H
src/bvar/detail/combiner.h
View file @
ef4eddde
...
...
@@ -15,8 +15,8 @@
// Author Zhangyi Chen (chenzhangyi01@baidu.com)
// Date 2014/09/22 11:57:43
#ifndef B
AIDU_BVAR_
_COMBINER_H
#define B
AIDU_BVAR_
_COMBINER_H
#ifndef B
VAR
_COMBINER_H
#define B
VAR
_COMBINER_H
#include <string> // std::string
#include <vector> // std::vector
...
...
@@ -341,4 +341,4 @@ private:
}
// namespace detail
}
// namespace bvar
#endif //
BAIDU_BVAR_
_COMBINER_H
#endif //
BVAR
_COMBINER_H
src/json2pb/encode_decode.h
View file @
ef4eddde
// Copyright (c) 2015 Baidu, Inc.
// Author: Jiang,Lin (jianglin05@baidu.com)
// Date: 2015/05/26 16:59:16
#ifndef
PROTOBUF_JSON
_ENCODE_DECODE_H
#define
PROTOBUF_JSON
_ENCODE_DECODE_H
#ifndef
BRPC_JSON2PB
_ENCODE_DECODE_H
#define
BRPC_JSON2PB
_ENCODE_DECODE_H
namespace
json2pb
{
...
...
@@ -27,4 +27,4 @@ bool decode_name(const std::string& content, std::string& decoded_content);
}
#endif //
PROTOBUF_JSON
_ENCODE_DECODE_H
#endif //
BRPC_JSON2PB
_ENCODE_DECODE_H
src/json2pb/rapidjson.h
View file @
ef4eddde
...
...
@@ -2,8 +2,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2015/03/17 15:34:52
#ifndef
PROTOBUF_JSON
_RAPIDJSON_H
#define
PROTOBUF_JSON
_RAPIDJSON_H
#ifndef
BRPC_JSON2PB
_RAPIDJSON_H
#define
BRPC_JSON2PB
_RAPIDJSON_H
#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
...
...
@@ -31,4 +31,4 @@
#pragma GCC diagnostic pop
#endif
#endif //
PROTOBUF_JSON
_RAPIDJSON_H
#endif //
BRPC_JSON2PB
_RAPIDJSON_H
src/json2pb/zero_copy_stream_reader.h
View file @
ef4eddde
...
...
@@ -3,8 +3,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2014/10/29 15:01:09
#ifndef
PROTOBUF_JSON
_ZERO_COPY_STREAM_READER_H
#define
PROTOBUF_JSON
_ZERO_COPY_STREAM_READER_H
#ifndef
BRPC_JSON2PB
_ZERO_COPY_STREAM_READER_H
#define
BRPC_JSON2PB
_ZERO_COPY_STREAM_READER_H
#include <google/protobuf/io/zero_copy_stream.h> // ZeroCopyInputStream
...
...
@@ -70,4 +70,4 @@ private:
}
// namespace json2pb
#endif //
PROTOBUF_JSON
_ZERO_COPY_STREAM_READER_H
#endif //
BRPC_JSON2PB
_ZERO_COPY_STREAM_READER_H
src/json2pb/zero_copy_stream_writer.h
View file @
ef4eddde
...
...
@@ -2,8 +2,8 @@
// Author: Zhangyi Chen (chenzhangyi01@baidu.com)
// Date: 2014/10/29 16:44:42
#ifndef
PROTOBUF_JSON
_ZERO_COPY_STREAM_WRITER_H
#define
PROTOBUF_JSON
_ZERO_COPY_STREAM_WRITER_H
#ifndef
BRPC_JSON2PB
_ZERO_COPY_STREAM_WRITER_H
#define
BRPC_JSON2PB
_ZERO_COPY_STREAM_WRITER_H
#include <google/protobuf/io/zero_copy_stream.h> // ZeroCopyOutputStream
#include <iostream>
...
...
@@ -98,4 +98,4 @@ private:
}
// namespace json2pb
#endif //
PROTOBUF_JSON
_ZERO_COPY_STREAM_WRITER_H
#endif //
BRPC_JSON2PB
_ZERO_COPY_STREAM_WRITER_H
src/mcpack2pb/field_type.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_FIELD_TYPE_H
#define
PUBLIC_
MCPACK2PB_MCPACK_FIELD_TYPE_H
#ifndef MCPACK2PB_MCPACK_FIELD_TYPE_H
#define MCPACK2PB_MCPACK_FIELD_TYPE_H
#include <stddef.h>
#include <stdint.h>
...
...
@@ -144,4 +144,4 @@ inline size_t get_primitive_type_size(FieldType type) {
}
// namespace mcpack2pb
#endif //
PUBLIC_
MCPACK2PB_MCPACK_FIELD_TYPE_H
#endif // MCPACK2PB_MCPACK_FIELD_TYPE_H
src/mcpack2pb/mcpack2pb.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_MCPACK2PB_H
#define
PUBLIC_
MCPACK2PB_MCPACK_MCPACK2PB_H
#ifndef MCPACK2PB_MCPACK_MCPACK2PB_H
#define MCPACK2PB_MCPACK_MCPACK2PB_H
#include <google/protobuf/message.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
...
...
@@ -159,4 +159,4 @@ inline bool MessageHandler::serialize_to_iobuf(
}
// namespace mcpack2pb
#endif //
PUBLIC_
MCPACK2PB_MCPACK_MCPACK2PB_H
#endif // MCPACK2PB_MCPACK_MCPACK2PB_H
src/mcpack2pb/parser-inl.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_PARSER_INL_H
#define
PUBLIC_
MCPACK2PB_MCPACK_PARSER_INL_H
#ifndef MCPACK2PB_MCPACK_PARSER_INL_H
#define MCPACK2PB_MCPACK_PARSER_INL_H
namespace
mcpack2pb
{
...
...
@@ -261,4 +261,4 @@ inline T ISOArrayIterator::as_fp() const {
}
// namespace mcpack2pb
#endif //
PUBLIC_
MCPACK2PB_MCPACK_PARSER_INL_H
#endif // MCPACK2PB_MCPACK_PARSER_INL_H
src/mcpack2pb/parser.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_PARSER_H
#define
PUBLIC_
MCPACK2PB_MCPACK_PARSER_H
#ifndef MCPACK2PB_MCPACK_PARSER_H
#define MCPACK2PB_MCPACK_PARSER_H
#include <limits> // std::numeric_limits
#include <google/protobuf/io/zero_copy_stream.h>
...
...
@@ -267,4 +267,4 @@ private:
#include "mcpack2pb/parser-inl.h"
#endif //
PUBLIC_
MCPACK2PB_MCPACK_PARSER_H
#endif // MCPACK2PB_MCPACK_PARSER_H
src/mcpack2pb/serializer-inl.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_INL_H
#define
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_INL_H
#ifndef MCPACK2PB_MCPACK_SERIALIZER_INL_H
#define MCPACK2PB_MCPACK_SERIALIZER_INL_H
void
*
fast_memcpy
(
void
*
__restrict
dest
,
const
void
*
__restrict
src
,
size_t
n
);
...
...
@@ -298,4 +298,4 @@ inline void Serializer::end_object_iso()
}
// namespace mcpack2pb
#endif //
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_INL_H
#endif // MCPACK2PB_MCPACK_SERIALIZER_INL_H
src/mcpack2pb/serializer.h
View file @
ef4eddde
...
...
@@ -16,8 +16,8 @@
// Author: Ge,Jun (gejun@baidu.com)
// Date: Mon Oct 19 17:17:36 CST 2015
#ifndef
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_H
#define
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_H
#ifndef MCPACK2PB_MCPACK_SERIALIZER_H
#define MCPACK2PB_MCPACK_SERIALIZER_H
#include <limits>
#include <google/protobuf/io/zero_copy_stream.h>
...
...
@@ -282,4 +282,4 @@ private:
#include "mcpack2pb/serializer-inl.h"
#endif //
PUBLIC_
MCPACK2PB_MCPACK_SERIALIZER_H
#endif // MCPACK2PB_MCPACK_SERIALIZER_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment