lidavidm commented on code in PR #10: URL: https://github.com/apache/arrow-nanoarrow/pull/10#discussion_r939027329
########## src/nanoarrow/bitmap_inline.h: ########## @@ -0,0 +1,323 @@ +// 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. + +#ifndef NANOARROW_BITMAP_INLINE_H_INCLUDED +#define NANOARROW_BITMAP_INLINE_H_INCLUDED + +#include <stdlib.h> +#include <string.h> + +#include "buffer_inline.h" +#include "typedefs_inline.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static const uint8_t _ArrowkBitmask[] = {1, 2, 4, 8, 16, 32, 64, 128}; +static const uint8_t _ArrowkFlippedBitmask[] = {254, 253, 251, 247, 239, 223, 191, 127}; +static const uint8_t _ArrowkPrecedingBitmask[] = {0, 1, 3, 7, 15, 31, 63, 127}; +static const uint8_t _ArrowkTrailingBitmask[] = {255, 254, 252, 248, 240, 224, 192, 128}; Review Comment: Ditto the comment about underscores in names here (unfortunately). ########## src/nanoarrow/buffer_inline.h: ########## @@ -15,14 +15,20 @@ // specific language governing permissions and limitations // under the License. +#ifndef NANOARROW_BUFFER_INLINE_H_INCLUDED +#define NANOARROW_BUFFER_INLINE_H_INCLUDED + #include <errno.h> -#include <stddef.h> -#include <stdlib.h> +#include <stdint.h> #include <string.h> -#include "nanoarrow.h" +#include "typedefs_inline.h" + +#ifdef __cplusplus +extern "C" { +#endif -static int64_t ArrowGrowByFactor(int64_t current_capacity, int64_t new_capacity) { +static inline int64_t _ArrowGrowByFactor(int64_t current_capacity, int64_t new_capacity) { Review Comment: It's not allowed to start names with an underscore: https://www.gnu.org/software/libc/manual/html_node/Reserved-Names.html -- 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]
