From 3b34beeaca0aca6aea2a4f1707991f8ad3b154a9 Mon Sep 17 00:00:00 2001 From: Cheng Chen Date: Fri, 20 Dec 2024 06:46:52 -0800 Subject: [PATCH] Small improvements (#493) 1. Make `pgduckdb/pgduckdb_types.hpp` self-contained 2. Enable `InvokeCPPFunc` to call functions without arguments --- include/pgduckdb/pgduckdb_types.hpp | 1 + include/pgduckdb/utility/cpp_wrapper.hpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/pgduckdb/pgduckdb_types.hpp b/include/pgduckdb/pgduckdb_types.hpp index 088752bc..97028a46 100644 --- a/include/pgduckdb/pgduckdb_types.hpp +++ b/include/pgduckdb/pgduckdb_types.hpp @@ -1,5 +1,6 @@ #pragma once +#include "duckdb/common/types/data_chunk.hpp" #include "pgduckdb/pg/declarations.hpp" #include "pgduckdb/utility/cpp_only_file.hpp" // Must be last include. diff --git a/include/pgduckdb/utility/cpp_wrapper.hpp b/include/pgduckdb/utility/cpp_wrapper.hpp index 6271c76a..77c19b06 100644 --- a/include/pgduckdb/utility/cpp_wrapper.hpp +++ b/include/pgduckdb/utility/cpp_wrapper.hpp @@ -30,7 +30,7 @@ __CPPFunctionGuard__(const char *func_name, FuncArgs... args) { } // namespace pgduckdb -#define InvokeCPPFunc(FUNC, ...) pgduckdb::__CPPFunctionGuard__(__FUNCTION__, __VA_ARGS__) +#define InvokeCPPFunc(FUNC, ...) pgduckdb::__CPPFunctionGuard__(__FUNCTION__, ##__VA_ARGS__) // Wrappers