Skip to content

Commit

Permalink
[clib] Reintroduce no-op destructor methods
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Aug 14, 2024
1 parent 1300674 commit e614dd3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
3 changes: 3 additions & 0 deletions include/cantera/clib/ct.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ extern "C" {
CANTERA_CAPI int soln_adjacentName(int n, int a, int lennm, char* nm);

CANTERA_CAPI int thermo_parent(int n);
CANTERA_CAPI int thermo_del(int n); //!< no-op; object is managed by Solution
CANTERA_CAPI int thermo_size();
CANTERA_CAPI size_t thermo_nElements(int n);
CANTERA_CAPI size_t thermo_nSpecies(int n);
Expand Down Expand Up @@ -131,6 +132,7 @@ extern "C" {
CANTERA_CAPI int thermo_setState_Tsat(int n, double t, double x);

CANTERA_CAPI int kin_parent(int n);
CANTERA_CAPI int kin_del(int n); //!< no-op; object is managed by Solution
CANTERA_CAPI size_t kin_nSpecies(int n);
CANTERA_CAPI size_t kin_nReactions(int n);
CANTERA_CAPI size_t kin_nPhases(int n);
Expand Down Expand Up @@ -163,6 +165,7 @@ extern "C" {
CANTERA_CAPI size_t kin_phase(int n, size_t i);

CANTERA_CAPI int trans_parent(int n);
CANTERA_CAPI int trans_del(int n); //!< no-op; object is managed by Solution
CANTERA_CAPI int trans_transportModel(int n, int lennm, char* nm);
CANTERA_CAPI double trans_viscosity(int n);
CANTERA_CAPI double trans_electricalConductivity(int n);
Expand Down
3 changes: 0 additions & 3 deletions interfaces/sourcegen/sourcegen/csharp/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ class_accesors:
# Derived: Base
derived_handles:
SurfaceHandle: ThermoPhaseHandle
ThermoPhaseHandle: SolutionHandle
KineticsHandle: SolutionHandle
TransportHandle: SolutionHandle

# Provides info for scaffolding higher-level idiomatic C# classes
# At this stage, we can scaffold simple properties that follow the
Expand Down
21 changes: 21 additions & 0 deletions src/clib/ct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1754,4 +1754,25 @@ extern "C" {
return handleAllExceptions(-2, ERR);
}
}

int thermo_del(int n)
{
// function is needed for sourcegen
// no-op: object is managed by Solution
return 0;
}

int kin_del(int n)
{
// function is needed for sourcegen
// no-op: object is managed by Solution
return 0;
}

int trans_del(int n)
{
// function is needed for sourcegen
// no-op: object is managed by Solution
return 0;
}
}

0 comments on commit e614dd3

Please sign in to comment.