yamt commented on code in PR #15579:
URL: https://github.com/apache/nuttx/pull/15579#discussion_r2052100070


##########
tools/mkerrno.py:
##########
@@ -0,0 +1,77 @@
+#!/usr/bin/env python3
+############################################################################
+# tools/mkerrno.py

Review Comment:
   > > sorry, can you explain how you can generate an equivalent of C code in 
this PR, eg.
   > > ```c
   > > #if defined(EPERM)
   > >         case EPERM:
   > >             return 1;
   > > #endif
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > with the approach?
   > 
   > it's hard to add `#if defined` in macro definition, but could doable with 
the macro trick like this: 
https://stackoverflow.com/questions/72266480/can-ifdef-be-used-inside-a-macro
   
   well, it might work for a single macro like DEBUG.
   however, in this case, we have to test every Exxx macros.
   



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to