Skip to content

Commit

Permalink
odb: changing std::string_view with std::string to make it compatible…
Browse files Browse the repository at this point in the history
… with swig

Signed-off-by: Felipe Garay <fgaray@google.com>
  • Loading branch information
fgaray committed Mar 8, 2024
1 parent b9263b2 commit 1a54406
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/odb/include/odb/db.h
Original file line number Diff line number Diff line change
Expand Up @@ -7638,7 +7638,7 @@ class dbScanChain : public dbObject
dbSet<dbScanInst> getScanInsts() const;

// User Code Begin dbScanChain
std::string_view getName() const;
const std::string& getName() const;

void setName(std::string_view name);

Expand All @@ -7651,7 +7651,7 @@ class dbScanChain : public dbObject
void setScanEnable(dbBTerm* scan_enable);
dbBTerm* getScanEnable() const;

std::string_view getTestMode() const;
const std::string& getTestMode() const;
void setTestMode(std::string_view test_mode);

static dbScanChain* create(dbDft* dft);
Expand All @@ -7674,7 +7674,7 @@ class dbScanInst : public dbObject

// User Code Begin dbScanInst
void setScanClock(std::string_view scan_clock);
std::string_view getScanClock() const;
const std::string& getScanClock() const;

void setClockEdge(ClockEdge clock_edge);
ClockEdge getClockEdge() const;
Expand Down Expand Up @@ -7713,7 +7713,7 @@ class dbScanPartition : public dbObject

std::variant<dbBTerm*, dbITerm*> getStop() const;

std::string_view getName() const;
const std::string& getName() const;

void setName(std::string_view name);

Expand Down
4 changes: 2 additions & 2 deletions src/odb/src/db/dbScanChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ dbSet<dbScanInst> dbScanChain::getScanInsts() const

// User Code Begin dbScanChainPublicMethods

std::string_view dbScanChain::getName() const
const std::string& dbScanChain::getName() const
{
_dbScanChain* scan_chain = (_dbScanChain*) this;
return scan_chain->name_;
Expand Down Expand Up @@ -263,7 +263,7 @@ void dbScanChain::setTestMode(std::string_view test_mode)
scan_chain->test_mode_ = test_mode;
}

std::string_view dbScanChain::getTestMode() const
const std::string& dbScanChain::getTestMode() const
{
_dbScanChain* scan_chain = (_dbScanChain*) this;
return scan_chain->test_mode_;
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbScanInst.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void dbScanInst::setScanClock(std::string_view scan_clock)
scan_inst->scan_clock_ = scan_clock;
}

std::string_view dbScanInst::getScanClock() const
const std::string& dbScanInst::getScanClock() const
{
_dbScanInst* scan_inst = (_dbScanInst*) this;
return scan_inst->scan_clock_;
Expand Down
2 changes: 1 addition & 1 deletion src/odb/src/db/dbScanPartition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ std::variant<dbBTerm*, dbITerm*> dbScanPartition::getStop() const
return scan_pin->getPin();
}

std::string_view dbScanPartition::getName() const
const std::string& dbScanPartition::getName() const
{
_dbScanPartition* scan_partition = (_dbScanPartition*) this;
return scan_partition->name_;
Expand Down

0 comments on commit 1a54406

Please sign in to comment.