lib: put __BT_UPCAST() and __BT_UPCAST_CONST() in `babeltrace.h`
[babeltrace.git] / include / babeltrace2 / types.h
index a8a8bb481160c4a689a7c698c823192fc795a813..99d9f1bfbf804f94693c563baf95afc14f3cfcf7 100644 (file)
@@ -2,7 +2,7 @@
 #define BABELTRACE2_TYPES_H
 
 /*
- * Copyright (c) 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright (c) 2010-2019 EfficiOS Inc. and Linux Foundation
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
 
 #include <stdint.h>
 
-/* Internal use */
-#ifdef __cplusplus
-# define __BT_UPCAST(_type, _p)                static_cast<_type *>(static_cast<void *>(_p))
-# define __BT_UPCAST_CONST(_type, _p)  static_cast<const _type *>(static_cast<const void *>(_p))
-#else
-# define __BT_UPCAST(_type, _p)                ((_type *) (_p))
-# define __BT_UPCAST_CONST(_type, _p)  ((const _type *) (_p))
-#endif
-
 #ifdef __cplusplus
 extern "C" {
 #endif
This page took 0.024053 seconds and 4 git commands to generate.