mike-jumper commented on PR #484:
URL: https://github.com/apache/guacamole-server/pull/484#issuecomment-1913376184

   > @mike-jumper Is there any chance this will cause ABI/API incompatibilities 
with library linking? I can't remember what conditions that occurs under...
   
   Mildly, yes. The changes here are ABI-compatible (enums don't end up as 
symbols in the library - they are just resolved to integers by the C compiler 
at compile time based on the definition in the header), but they are not 
API-compatible.
   
   To maintain API compatibility, we would need to:
   
   1. Keep `GUAC_STATUS_NOT_INPLEMENTED` (sic), but mark it as deprecated.
   2. Add the corrected `GUAC_STATUS_NOT_IMPLEMENTED` constant, explicitly 
mapped to the same value as old `GUAC_STATUS_NOT_INPLEMENTED` (this will 
require adding explicit values to all constants in the `enum`)
   
   So we'd end up with something like:
   
   ```c
       ...
   
       /**
        * The requested operation is not supported.
        */
       GUAC_STATUS_NOT_SUPPORTED = 14,
   
       /**
        * Support for the requested operation is not yet implemented.
        *
        * @deprecated This constant contains a typo in its name and will be
        * removed in a future release. Use GUAC_STATUS_NOT_IMPLEMENTED instead.
        */
       GUAC_STATUS_NOT_INPLEMENTED = 15,
   
       /**
        * Support for the requested operation is not yet implemented.
        */
       GUAC_STATUS_NOT_IMPLEMENTED = 15,
   
       /**
        * The operation is temporarily unable to be performed, but may succeed 
if
        * reattempted.
        */
       GUAC_STATUS_TRY_AGAIN = 16,
   
       ...
   ```
   
   That would ensure that code that continues to reference the old 
`GUAC_STATUS_NOT_INPLEMENTED` constant will still compile.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to