You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2021/12/20 14:00:12 UTC

[GitHub] [qpid-dispatch] kgiusti commented on a change in pull request #1465: DISPATCH-1403: define a common lightweight buffer field API

kgiusti commented on a change in pull request #1465:
URL: https://github.com/apache/qpid-dispatch/pull/1465#discussion_r772386729



##########
File path: include/qpid/dispatch/buffer_field.h
##########
@@ -0,0 +1,44 @@
+#ifndef __dispatch_buffer_field_h__
+#define __dispatch_buffer_field_h__ 1
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/** @file
+ * Data fields spanning multiple buffers
+ * @internal
+ * @defgroup buffer_field buffer_field
+ * @{
+ */
+
+#include "qpid/dispatch/buffer.h"
+
+#include <stdbool.h>
+
+/* descriptor for a sequence of bytes in a buffer list
+ */
+typedef struct qd_buffer_field_t qd_buffer_field_t;
+struct qd_buffer_field_t {
+    qd_buffer_t   *buffer;  // hold start of data
+    const uint8_t *cursor;  // first octet of data
+    size_t         length;  // of data

Review comment:
       Yes - the original source for the buffer field code is a set of file-private inline functions in interator.c; that used the term "remaining" instead of "length".  No reason to change it - let's go back to "remaining".




-- 
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: dev-unsubscribe@qpid.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org