You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/05 09:19:43 UTC

[GitHub] [pulsar] AllenChien opened a new issue #5800: C API 'pulsar_message_id_t' couples to C++ 'class pulsar::MessageId'

AllenChien opened a new issue #5800: C API 'pulsar_message_id_t' couples to C++ 'class pulsar::MessageId'
URL: https://github.com/apache/pulsar/issues/5800
 
 
   **Describe the bug**
   
   The C API prototype defined in message_id.h, such as:
   
   > PULSAR_PUBLIC const pulsar_message_id_t *pulsar_message_id_earliest();
   > PULSAR_PUBLIC const pulsar_message_id_t *pulsar_message_id_latest();
   
   the return type is pulsar_message_id_t, which is defined as:
   
   > struct _pulsar_message_id {
   > pulsar::MessageId messageId;
   > };
   
   where the pulsar::MessageId is a C++ class. Thus this kind of APIs can't work smoothly in pure C env. 
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. Go to source file 'message_id.h'
   2. Check its definition
   
   **Expected behavior**
   C API should not couple to C++ class definition.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services