xiaoxiang781216 commented on code in PR #7688:
URL: https://github.com/apache/incubator-nuttx/pull/7688#discussion_r1031709402


##########
include/nuttx/streams.h:
##########
@@ -40,6 +40,16 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+#define stream_write(stream, buf, len) \
+        (( FAR struct lib_outstream_s *)stream)->puts \
+        (( FAR struct lib_outstream_s *)stream, buf, len)
+#define stream_putc(stream, buf, len) \
+        (( FAR struct lib_outstream_s *)stream)->putc \
+        (( FAR struct lib_outstream_s *)stream, ch)
+#define stream_getc(stream) \
+        (( FAR struct lib_instream_s *)stream)->get \
+        (( FAR struct lib_instream_s *)stream)

Review Comment:
   let's create a new patch to change all direct access to the new macro



##########
include/nuttx/streams.h:
##########
@@ -40,6 +40,16 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+#define stream_write(stream, buf, len) \

Review Comment:
   change to:
   ```
   #define lib_stream_puts(stream, buf, len) \
            (FAR struct lib_outstream_s *)(stream)->puts( \
            (FAR struct lib_outstream_s *)(stream), buf, len)
   ```
   apply the similar change to the follow macro



##########
include/nuttx/streams.h:
##########
@@ -40,6 +40,16 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
+#define stream_write(stream, buf, len) \
+        (( FAR struct lib_outstream_s *)stream)->puts \
+        (( FAR struct lib_outstream_s *)stream, buf, len)
+#define stream_putc(stream, buf, len) \
+        (( FAR struct lib_outstream_s *)stream)->putc \
+        (( FAR struct lib_outstream_s *)stream, ch)
+#define stream_getc(stream) \

Review Comment:
   what other wrapper e.g. seek nput, nget



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