gpr_slice.h 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. *
  3. * Copyright 2016 gRPC authors.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. *
  17. */
  18. #ifndef GRPC_IMPL_CODEGEN_GPR_SLICE_H
  19. #define GRPC_IMPL_CODEGEN_GPR_SLICE_H
  20. // IWYU pragma: private
  21. /** WARNING: Please do not use this header. This was added as a temporary
  22. * measure to not break some of the external projects that depend on
  23. * gpr_slice_* functions. We are actively working on moving all the
  24. * gpr_slice_* references to grpc_slice_* and this file will be removed
  25. */
  26. /* TODO (sreek) - Allowed by default but will be very soon turned off */
  27. #define GRPC_ALLOW_GPR_SLICE_FUNCTIONS 1
  28. #ifdef GRPC_ALLOW_GPR_SLICE_FUNCTIONS
  29. #define gpr_slice_refcount grpc_slice_refcount
  30. #define gpr_slice grpc_slice
  31. #define gpr_slice_buffer grpc_slice_buffer
  32. #define gpr_slice_ref grpc_slice_ref
  33. #define gpr_slice_unref grpc_slice_unref
  34. #define gpr_slice_new grpc_slice_new
  35. #define gpr_slice_new_with_user_data grpc_slice_new_with_user_data
  36. #define gpr_slice_new_with_len grpc_slice_new_with_len
  37. #define gpr_slice_malloc grpc_slice_malloc
  38. #define gpr_slice_from_copied_string grpc_slice_from_copied_string
  39. #define gpr_slice_from_copied_buffer grpc_slice_from_copied_buffer
  40. #define gpr_slice_from_static_string grpc_slice_from_static_string
  41. #define gpr_slice_sub grpc_slice_sub
  42. #define gpr_slice_sub_no_ref grpc_slice_sub_no_ref
  43. #define gpr_slice_split_tail grpc_slice_split_tail
  44. #define gpr_slice_split_head grpc_slice_split_head
  45. #define gpr_slice_cmp grpc_slice_cmp
  46. #define gpr_slice_str_cmp grpc_slice_str_cmp
  47. #define gpr_slice_buffer grpc_slice_buffer
  48. #define gpr_slice_buffer_init grpc_slice_buffer_init
  49. #define gpr_slice_buffer_destroy grpc_slice_buffer_destroy
  50. #define gpr_slice_buffer_add grpc_slice_buffer_add
  51. #define gpr_slice_buffer_add_indexed grpc_slice_buffer_add_indexed
  52. #define gpr_slice_buffer_addn grpc_slice_buffer_addn
  53. #define gpr_slice_buffer_tiny_add grpc_slice_buffer_tiny_add
  54. #define gpr_slice_buffer_pop grpc_slice_buffer_pop
  55. #define gpr_slice_buffer_reset_and_unref grpc_slice_buffer_reset_and_unref
  56. #define gpr_slice_buffer_swap grpc_slice_buffer_swap
  57. #define gpr_slice_buffer_move_into grpc_slice_buffer_move_into
  58. #define gpr_slice_buffer_trim_end grpc_slice_buffer_trim_end
  59. #define gpr_slice_buffer_move_first grpc_slice_buffer_move_first
  60. #define gpr_slice_buffer_take_first grpc_slice_buffer_take_first
  61. #endif /* GRPC_ALLOW_GPR_SLICE_FUNCTIONS */
  62. #endif /* GRPC_IMPL_CODEGEN_GPR_SLICE_H */