mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-20 16:01:29 +00:00
Adds SEQ_DECL_SIZE 1 back under clang and a test (#23942)
This commit is contained in:
@@ -475,7 +475,9 @@ typedef char* NCSTRING;
|
||||
} name = {{length, (NI) ((NU)length | NIM_STRLIT_FLAG)}, str}
|
||||
|
||||
/* declared size of a sequence/variable length array: */
|
||||
#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)
|
||||
#if defined(__cplusplus) && defined(__clang__)
|
||||
# define SEQ_DECL_SIZE 1
|
||||
#elif defined(__GNUC__) || defined(_MSC_VER)
|
||||
# define SEQ_DECL_SIZE /* empty is correct! */
|
||||
#else
|
||||
# define SEQ_DECL_SIZE 1000000
|
||||
|
||||
4
tests/cpp/fam.h
Normal file
4
tests/cpp/fam.h
Normal file
@@ -0,0 +1,4 @@
|
||||
struct Test{
|
||||
~Test() {
|
||||
}
|
||||
};
|
||||
7
tests/cpp/tfam.nim
Normal file
7
tests/cpp/tfam.nim
Normal file
@@ -0,0 +1,7 @@
|
||||
discard """
|
||||
targets: "cpp"
|
||||
"""
|
||||
type
|
||||
Test {.importcpp, header: "fam.h".} = object
|
||||
|
||||
let test = newSeq[Test]()
|
||||
Reference in New Issue
Block a user