fixes tests

This commit is contained in:
ringabout
2025-01-08 21:45:26 +08:00
parent ce20f1b31a
commit 33263ef806
6 changed files with 8 additions and 8 deletions

View File

@@ -30,11 +30,11 @@ var s = bork()
import tables
type
cdbl {.importc: "double".} = object
cdbl {.importc: "double", nodecl.} = object
MyObject = ref object of RootObj
y: Table[string, cdbl]
proc test =
var x = new(MyObject)

View File

@@ -140,7 +140,7 @@ block: # bug #9940
typedef struct { int base; } S;
""".}
type S {.importc: "S", completeStruct.} = object
type S {.importc: "S", nodecl, completeStruct.} = object
base: cint
proc init(x:ptr S) =
x.base = 1

View File

@@ -15,7 +15,7 @@ struct SystemManager {
""".}
type Input {.importcpp: "System::Input".} = object
type Input {.importcpp: "System::Input", nodecl.} = object
proc getSubsystem*[T](): ptr T {.
importcpp: "SystemManager::getSubsystem<'*0>()", nodecl.}

View File

@@ -26,7 +26,7 @@ template ensureCgen(T: typedesc) =
var a {.volatile.}: T
block:
type Foo1Alias{.importc: "struct Foo1", size: sizeof(cint).} = object
type Foo1Alias{.importc: "struct Foo1", nodecl, size: sizeof(cint).} = object
a: cint
ensureCgen Foo1Alias

View File

@@ -488,7 +488,7 @@ typedef struct{
""".}
type
Foo {.importc.} = object
Foo {.importc, nodecl.} = object
Bar = object
b: byte
@@ -549,7 +549,7 @@ doAssert alignof(MyCustomAlignObject) == 32
##########################################
type
imported_double {.importc: "double".} = object
imported_double {.importc: "double", nodecl.} = object
Pod = object
v* : imported_double

View File

@@ -15,7 +15,7 @@ cimported set1_imported(double x) {
"""}
type vfloat{.importc: "cimported".} = object
type vfloat{.importc: "cimported", nodecl.} = object
proc set1(a: float): vfloat {.importc: "set1_imported".}