Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jun 2023 15:53:09 GMT
From:      Yuri Victorovich <yuri@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 45027c0066d0 - main - =?utf-8?Q?biology/py-python-libsbml:=20Update=205.19.0=20=E2=86=92=205.20.1?=
Message-ID:  <202306261553.35QFr9af063114@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=45027c0066d01a3ddaefcf99a72d9f84970fff21

commit 45027c0066d01a3ddaefcf99a72d9f84970fff21
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-06-26 15:19:57 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-06-26 15:53:03 +0000

    biology/py-python-libsbml: Update 5.19.0 → 5.20.1
    
    Reported by:    portscout
---
 biology/py-python-libsbml/Makefile                 |    5 +-
 biology/py-python-libsbml/distinfo                 |    6 +-
 .../files/patch-libsbml__source_src_sbml_SBase.cpp | 2592 ++++++++++++++++++++
 3 files changed, 2598 insertions(+), 5 deletions(-)

diff --git a/biology/py-python-libsbml/Makefile b/biology/py-python-libsbml/Makefile
index 5d26e65f429f..d0b1be3400fb 100644
--- a/biology/py-python-libsbml/Makefile
+++ b/biology/py-python-libsbml/Makefile
@@ -1,7 +1,8 @@
 PORTNAME=	python-libsbml
-DISTVERSION=	5.19.0
+DISTVERSION=	5.20.1
 CATEGORIES=	biology python
-MASTER_SITES=	PYPI
+#MASTER_SITES=	PYPI # no tarballs on PYPI
+MASTER_SITES=	https://github.com/sbmlteam/python-libsbml/releases/download/v${DISTVERSION}/
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
 MAINTAINER=	yuri@FreeBSD.org
diff --git a/biology/py-python-libsbml/distinfo b/biology/py-python-libsbml/distinfo
index 6f7129d3cedb..dc3cf221dc71 100644
--- a/biology/py-python-libsbml/distinfo
+++ b/biology/py-python-libsbml/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1629231482
-SHA256 (python-libsbml-5.19.0.tar.gz) = 87596017aa76c1284e83247593fe999ab7ba9a84e7488bcf0434b01277858f86
-SIZE (python-libsbml-5.19.0.tar.gz) = 36842483
+TIMESTAMP = 1687747738
+SHA256 (python-libsbml-5.20.1.tar.gz) = 5a10f0a494ba03ffda5190430f80a15516357d2d17698b928a01cbd2e231bf45
+SIZE (python-libsbml-5.20.1.tar.gz) = 48808000
diff --git a/biology/py-python-libsbml/files/patch-libsbml__source_src_sbml_SBase.cpp b/biology/py-python-libsbml/files/patch-libsbml__source_src_sbml_SBase.cpp
new file mode 100644
index 000000000000..8efff8c5aebe
--- /dev/null
+++ b/biology/py-python-libsbml/files/patch-libsbml__source_src_sbml_SBase.cpp
@@ -0,0 +1,2592 @@
+--- libsbml_source/src/sbml/SBase.cpp.orig	2023-06-26 04:05:56 UTC
++++ libsbml_source/src/sbml/SBase.cpp
+@@ -93,7 +93,7 @@ struct DeletePluginEntity
+ struct ClonePluginEntity 
+ {
+   SBasePlugin* operator() (const SBasePlugin* sb) {
+-    if (!sb) return NULL;
++    if (!sb) return 0;
+     return sb->clone();
+   }
+ };
+@@ -103,7 +103,7 @@ struct ClonePluginEntity 
+ SBase*
+ SBase::getElementBySId(const std::string& id)
+ {
+-  if (id.empty()) return NULL;
++  if (id.empty()) return 0;
+   return getElementFromPluginsBySId(id);
+ }
+ 
+@@ -118,7 +118,7 @@ SBase::getElementBySId(const std::string& id) const
+ SBase*
+ SBase::getElementByMetaId(const std::string& metaid)
+ {
+-  if (metaid.empty()) return NULL;
++  if (metaid.empty()) return 0;
+   return getElementFromPluginsByMetaId(metaid);
+ }
+ 
+@@ -188,9 +188,9 @@ SBase::getElementFromPluginsBySId(const std::string& i
+   for (size_t i=0; i < mPlugins.size(); i++)
+   {
+     SBase* subObj = mPlugins[i]->getElementBySId(id);
+-    if (subObj != NULL) return subObj;
++    if (subObj != 0) return subObj;
+   }
+-  return NULL;
++  return 0;
+ }
+ /** @endcond */
+ 
+@@ -202,9 +202,9 @@ SBase::getElementFromPluginsByMetaId(const std::string
+   for (size_t i=0; i < mPlugins.size(); i++)
+   {
+     SBase* subObj = mPlugins[i]->getElementByMetaId(metaid);
+-    if (subObj != NULL) return subObj;
++    if (subObj != 0) return subObj;
+   }
+-  return NULL;
++  return 0;
+ }
+ /** @endcond */
+ 
+@@ -276,7 +276,7 @@ SBase::transformIdentifiers(IdentifierTransformer* idT
+   }
+ 
+   // call transformer
+-  if (idTransformer != NULL)
++  if (idTransformer != 0)
+   {
+     ret = idTransformer->transform(this);
+     if (ret != LIBSBML_OPERATION_SUCCESS)
+@@ -296,7 +296,7 @@ SBase::getAllElementsFromPlugins(ElementFilter *filter
+   for (size_t i=0; i < mPlugins.size(); i++)
+   {
+     List* sublist = mPlugins[i]->getAllElements(filter);
+-    if (sublist != NULL)
++    if (sublist != 0)
+     {
+       if (sublist->getSize() > 0)
+         ret->transferFrom(sublist);
+@@ -316,17 +316,17 @@ SBase::SBase (unsigned int level, unsigned int version
+    mId   ( "" )
+  , mName ( "" )
+  , mMetaId ( "" )
+- , mNotes     ( NULL )
+- , mAnnotation( NULL )
+- , mSBML      ( NULL )
+- , mSBMLNamespaces (NULL)
+- , mUserData(NULL)
++ , mNotes     ( 0 )
++ , mAnnotation( 0 )
++ , mSBML      ( 0 )
++ , mSBMLNamespaces (0)
++ , mUserData(0)
+  , mSBOTerm   ( -1 )
+  , mLine      ( 0 )
+  , mColumn    ( 0 )
+- , mParentSBMLObject (NULL)
+- , mCVTerms   ( NULL )
+- , mHistory   ( NULL )
++ , mParentSBMLObject (0)
++ , mCVTerms   ( 0 )
++ , mHistory   ( 0 )
+  , mHasBeenDeleted (false)
+  , mEmptyString ("")
+  , mURI("")
+@@ -362,17 +362,17 @@ SBase::SBase (const SBMLNamespaces *sbmlns) :
+    mId   ( "" )
+  , mName ( "" )
+  , mMetaId ( "" )
+- , mNotes     ( NULL )
+- , mAnnotation( NULL )
+- , mSBML      ( NULL )
+- , mSBMLNamespaces (NULL)
+- , mUserData(NULL)
++ , mNotes     ( 0 )
++ , mAnnotation( 0 )
++ , mSBML      ( 0 )
++ , mSBMLNamespaces (0)
++ , mUserData(0)
+  , mSBOTerm   ( -1 )
+  , mLine      ( 0 )
+  , mColumn    ( 0 )
+- , mParentSBMLObject (NULL)
+- , mCVTerms   ( NULL )
+- , mHistory   ( NULL )
++ , mParentSBMLObject (0)
++ , mCVTerms   ( 0 )
++ , mHistory   ( 0 )
+  , mHasBeenDeleted (false)
+  , mEmptyString ("")
+  , mURI("")
+@@ -416,17 +416,17 @@ SBase::SBase(const SBase& orig)
+   : mId (orig.mId)
+   , mName (orig.mName)
+   , mMetaId (orig.mMetaId)
+-  , mNotes (NULL)
+-  , mAnnotation (NULL)
+-  , mSBML (NULL)
+-  , mSBMLNamespaces(NULL)
++  , mNotes (0)
++  , mAnnotation (0)
++  , mSBML (0)
++  , mSBMLNamespaces(0)
+   , mUserData(orig.mUserData)
+   , mSBOTerm(orig.mSBOTerm)
+   , mLine(orig.mLine)
+   , mColumn(orig.mColumn)
+-  , mParentSBMLObject(NULL)
+-  , mCVTerms(NULL)
+-  , mHistory(NULL)
++  , mParentSBMLObject(0)
++  , mCVTerms(0)
++  , mHistory(0)
+   , mHasBeenDeleted(false)
+   , mEmptyString()
+   , mPlugins(orig.mPlugins.size())
+@@ -439,17 +439,17 @@ SBase::SBase(const SBase& orig)
+   , mElementsOfUnknownPkg (orig.mElementsOfUnknownPkg)
+   , mElementsOfUnknownDisabledPkg (orig.mElementsOfUnknownDisabledPkg)
+ {
+-  if(orig.mNotes != NULL)
++  if(orig.mNotes != 0)
+     this->mNotes = new XMLNode(*const_cast<SBase&>(orig).getNotes());
+ 
+-  if(orig.mAnnotation != NULL)
++  if(orig.mAnnotation != 0)
+     this->mAnnotation = new XMLNode(*const_cast<SBase&>(orig).mAnnotation);
+ 
+-  if(orig.getSBMLNamespaces() != NULL)
++  if(orig.getSBMLNamespaces() != 0)
+     this->mSBMLNamespaces =
+     new SBMLNamespaces(*const_cast<SBase&>(orig).getSBMLNamespaces());
+ 
+-  if(orig.mCVTerms != NULL)
++  if(orig.mCVTerms != 0)
+   {
+     this->mCVTerms  = new List();
+     unsigned int iMax = orig.mCVTerms->getSize();
+@@ -460,7 +460,7 @@ SBase::SBase(const SBase& orig)
+     }
+   }
+ 
+-  if (orig.mHistory != NULL)
++  if (orig.mHistory != 0)
+   {
+     this->mHistory = orig.mHistory->clone();
+   }
+@@ -481,10 +481,10 @@ SBase::SBase(const SBase& orig)
+  */
+ SBase::~SBase ()
+ {
+-  if (mNotes != NULL)       delete mNotes;
+-  if (mAnnotation != NULL)  delete mAnnotation;
+-  if (mSBMLNamespaces != NULL)  delete mSBMLNamespaces;
+-  if (mCVTerms != NULL)
++  if (mNotes != 0)       delete mNotes;
++  if (mAnnotation != 0)  delete mAnnotation;
++  if (mSBMLNamespaces != 0)  delete mSBMLNamespaces;
++  if (mCVTerms != 0)
+   {
+     unsigned int size = mCVTerms->getSize();
+     while (size > 0) 
+@@ -494,7 +494,7 @@ SBase::~SBase ()
+     }
+     delete mCVTerms;
+   }
+-  if (mHistory != NULL) delete mHistory;
++  if (mHistory != 0) delete mHistory;
+   mHasBeenDeleted = true;
+ 
+   for_each( mPlugins.begin(), mPlugins.end(), DeletePluginEntity() );
+@@ -514,17 +514,17 @@ SBase& SBase::operator=(const SBase& rhs)
+ 
+     delete this->mNotes;
+ 
+-    if(rhs.mNotes != NULL)
++    if(rhs.mNotes != 0)
+       this->mNotes = new XMLNode(*const_cast<SBase&>(rhs).getNotes());
+     else
+-      this->mNotes = NULL;
++      this->mNotes = 0;
+ 
+     delete this->mAnnotation;
+ 
+-    if(rhs.mAnnotation != NULL)
++    if(rhs.mAnnotation != 0)
+       this->mAnnotation = new XMLNode(*const_cast<SBase&>(rhs).mAnnotation);
+     else
+-      this->mAnnotation = NULL;
++      this->mAnnotation = 0;
+ 
+     this->mSBML       = rhs.mSBML;
+     this->mSBOTerm    = rhs.mSBOTerm;
+@@ -539,21 +539,21 @@ SBase& SBase::operator=(const SBase& rhs)
+ 
+     delete this->mSBMLNamespaces;
+ 
+-    if(rhs.mSBMLNamespaces != NULL)
++    if(rhs.mSBMLNamespaces != 0)
+       this->mSBMLNamespaces =
+       new SBMLNamespaces(*const_cast<SBase&>(rhs).mSBMLNamespaces);
+     else
+-      this->mSBMLNamespaces = NULL;
++      this->mSBMLNamespaces = 0;
+ 
+ 
+-    if(this->mCVTerms != NULL)
++    if(this->mCVTerms != 0)
+     {
+       unsigned int size = this->mCVTerms->getSize();
+       while (size--) delete static_cast<CVTerm*>( this->mCVTerms->remove(0) );
+       delete this->mCVTerms;
+     }
+ 
+-    if(rhs.mCVTerms != NULL)
++    if(rhs.mCVTerms != 0)
+     {
+       this->mCVTerms  = new List();
+       unsigned int iMax = rhs.mCVTerms->getSize();
+@@ -565,17 +565,17 @@ SBase& SBase::operator=(const SBase& rhs)
+     }
+     else
+     {
+-      this->mCVTerms = NULL;
++      this->mCVTerms = 0;
+     }
+ 
+     delete this->mHistory;
+-    if (rhs.mHistory != NULL)
++    if (rhs.mHistory != 0)
+     {
+       this->mHistory = rhs.mHistory->clone();
+     }
+     else
+     {
+-      this->mHistory = NULL;
++      this->mHistory = 0;
+     }
+ 
+     this->mHasBeenDeleted = rhs.mHasBeenDeleted;
+@@ -630,7 +630,7 @@ SBase::loadPlugins(SBMLNamespaces *sbmlns)
+         const std::string &prefix = xmlns->getPrefix(i);
+         const SBasePluginCreatorBase* sbPluginCreator = sbmlext->getSBasePluginCreator(extPoint);
+ 
+-        if (sbPluginCreator == NULL)
++        if (sbPluginCreator == 0)
+         {
+           sbPluginCreator = sbmlext->getSBasePluginCreator(genericPoint);
+         }
+@@ -824,12 +824,12 @@ SBase::getURI() const
+   const string &package = getPackageName();
+   const SBMLDocument* doc = getSBMLDocument();
+ 
+-  if (doc == NULL)
++  if (doc == 0)
+     return getElementNamespace();
+ 
+   SBMLNamespaces* sbmlns = doc->getSBMLNamespaces();
+ 
+-  if (sbmlns == NULL)
++  if (sbmlns == 0)
+     return getElementNamespace();
+ 
+   if (package == "" || package == "core")
+@@ -879,11 +879,11 @@ int
+ SBase::setUserData(void *userData)
+ {
+   this->mUserData = userData;
+-  if (userData == NULL && mUserData == NULL)
++  if (userData == 0 && mUserData == 0)
+   {
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+-  else if (mUserData != NULL)
++  else if (mUserData != 0)
+   {
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+@@ -896,7 +896,7 @@ SBase::setUserData(void *userData)
+ bool
+ SBase::isSetUserData() const
+ {
+-  if (mUserData != NULL)
++  if (mUserData != 0)
+   {
+     return true;
+   }
+@@ -909,8 +909,8 @@ SBase::isSetUserData() const
+ int
+ SBase::unsetUserData()
+ {
+-  this->mUserData = NULL;
+-  if (mUserData == NULL)
++  this->mUserData = 0;
++  if (mUserData == 0)
+   {
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+@@ -926,11 +926,11 @@ SBase::unsetUserData()
+ XMLNamespaces*
+ SBase::getNamespaces() const
+ {
+-  if (mSBML != NULL)
++  if (mSBML != 0)
+     return mSBML->getSBMLNamespaces()->getNamespaces();
+-  if (mSBMLNamespaces != NULL)
++  if (mSBMLNamespaces != 0)
+     return mSBMLNamespaces->getNamespaces();
+-  return NULL;
++  return 0;
+ }
+ 
+ 
+@@ -942,9 +942,9 @@ SBase::getSBMLDocument () const
+ {
+   // if the doc object has been deleted the pointer is
+   // still valid but points to nothing
+-  if (mSBML != NULL && mSBML->getHasBeenDeleted())
++  if (mSBML != 0 && mSBML->getHasBeenDeleted())
+   {
+-    return NULL;
++    return 0;
+   }
+ 
+   return mSBML;
+@@ -958,9 +958,9 @@ SBase::getSBMLDocument ()
+ {
+   // if the doc object has been deleted the pointer is
+   // still valid but points to nothing
+-  if (mSBML != NULL && mSBML->getHasBeenDeleted())
++  if (mSBML != 0 && mSBML->getHasBeenDeleted())
+   {
+-    return NULL;
++    return 0;
+   }
+   return mSBML;
+ }
+@@ -969,9 +969,9 @@ SBase::getParentSBMLObject ()
+ {
+   // if the parent object has been deleted the pointer is
+   // still valid but points to nothing
+-  if (mParentSBMLObject != NULL && mParentSBMLObject->getHasBeenDeleted())
++  if (mParentSBMLObject != 0 && mParentSBMLObject->getHasBeenDeleted())
+   {
+-    return NULL;
++    return 0;
+   }
+ 
+   return mParentSBMLObject;
+@@ -982,9 +982,9 @@ SBase::getParentSBMLObject () const
+ {
+   // if the parent object has been deleted the pointer is
+   // still valid but points to nothing
+-  if (mParentSBMLObject != NULL && mParentSBMLObject->getHasBeenDeleted())
++  if (mParentSBMLObject != 0 && mParentSBMLObject->getHasBeenDeleted())
+   {
+-    return NULL;
++    return 0;
+   }
+ 
+   return mParentSBMLObject;
+@@ -1068,26 +1068,26 @@ SBase::getModelHistory()
+ Date*
+ SBase::getCreatedDate() const
+ {
+-  return (mHistory != NULL)  ? mHistory->getCreatedDate() : NULL;
++  return (mHistory != 0)  ? mHistory->getCreatedDate() : 0;
+ }
+ 
+ Date*
+ SBase::getCreatedDate()
+ {
+-  return (mHistory != NULL) ? mHistory->getCreatedDate() : NULL;
++  return (mHistory != 0) ? mHistory->getCreatedDate() : 0;
+ }
+ 
+ 
+ Date*
+ SBase::getModifiedDate(unsigned int n)
+ {
+-  return (mHistory != NULL) ? mHistory->getModifiedDate(n) : NULL;
++  return (mHistory != 0) ? mHistory->getModifiedDate(n) : 0;
+ }
+ 
+ unsigned int
+ SBase::getNumModifiedDates()
+ {
+-  return (mHistory != NULL) ? mHistory->getNumModifiedDates() : NULL;
++  return (mHistory != 0) ? mHistory->getNumModifiedDates() : 0;
+ }
+ 
+ 
+@@ -1142,7 +1142,7 @@ SBase::isSetIdAttribute () const
+ bool
+ SBase::isSetNotes () const
+ {
+-  return (mNotes != NULL);
++  return (mNotes != 0);
+ }
+ 
+ 
+@@ -1154,7 +1154,7 @@ bool
+ SBase::isSetAnnotation () const
+ {
+   const_cast <SBase *> (this)->syncAnnotation();
+-  return (mAnnotation != NULL);
++  return (mAnnotation != 0);
+ }
+ 
+ 
+@@ -1172,14 +1172,14 @@ SBase::isSetSBOTerm () const
+ bool
+ SBase::isSetModelHistory() const
+ {
+-  return (mHistory != NULL);
++  return (mHistory != 0);
+ }
+ 
+ 
+ bool
+ SBase::isSetCreatedDate() const
+ {
+-  return (mHistory == NULL) ? false : mHistory->isSetCreatedDate();
++  return (mHistory == 0) ? false : mHistory->isSetCreatedDate();
+ }
+ 
+ 
+@@ -1187,7 +1187,7 @@ SBase::isSetCreatedDate() const
+ bool
+ SBase::isSetModifiedDate() const
+ {
+-  return (mHistory == NULL) ? false : mHistory->isSetModifiedDate();
++  return (mHistory == 0) ? false : mHistory->isSetModifiedDate();
+ }
+ 
+ 
+@@ -1304,10 +1304,10 @@ SBase::setAnnotation (const XMLNode* annotation)
+   //
+   //
+ 
+-  if (annotation == NULL)
++  if (annotation == 0)
+   {
+     delete mAnnotation;
+-    mAnnotation = NULL;
++    mAnnotation = 0;
+   }
+ 
+ 
+@@ -1321,7 +1321,7 @@ SBase::setAnnotation (const XMLNode* annotation)
+       || RDFAnnotationParser::hasHistoryRDFAnnotation(annotation) == true)
+       && isSetMetaId() == false)
+     {
+-      mAnnotation = NULL;
++      mAnnotation = 0;
+       return LIBSBML_MISSING_METAID;
+     }
+     else
+@@ -1363,24 +1363,24 @@ SBase::setAnnotation (const XMLNode* annotation)
+   // delete existing mCVTerms
+   //
+   // existing CVTerms (if any) needs to be deleted at any rate, otherwise
+-  // unsetAnnotation() ( setAnnotation(NULL) ) doesn't work as expected.
++  // unsetAnnotation() ( setAnnotation(0) ) doesn't work as expected.
+   // (These functions must clear all elements in an annotation.)
+   //
+ 
+   /* in L3 might be a model history */
+-  if (mHistory != NULL)
++  if (mHistory != 0)
+   {
+     delete mHistory;
+-    mHistory = NULL;
++    mHistory = 0;
+   }
+ 
+-  if (mCVTerms != NULL)
++  if (mCVTerms != 0)
+   {
+     // delete existing mCVTerms (if any)
+     unsigned int size = mCVTerms->getSize();
+     while (size--) delete static_cast<CVTerm*>( mCVTerms->remove(0) );
+     delete mCVTerms;
+-    mCVTerms = NULL;
++    mCVTerms = 0;
+   }
+ 
+   unsigned int level = getLevel();
+@@ -1392,7 +1392,7 @@ SBase::setAnnotation (const XMLNode* annotation)
+     validNestedTerms = false;
+   }
+ 
+-  if(mAnnotation != NULL
++  if(mAnnotation != 0
+         && RDFAnnotationParser::hasCVTermRDFAnnotation(mAnnotation))
+   {
+     // parse mAnnotation (if any) and set mCVTerms
+@@ -1416,7 +1416,7 @@ SBase::setAnnotation (const XMLNode* annotation)
+     mCVTermsChanged = true;
+   }
+ 
+-  if(getLevel() > 2 && mAnnotation != NULL
++  if(getLevel() > 2 && mAnnotation != 0
+      && RDFAnnotationParser::hasHistoryRDFAnnotation(mAnnotation))
+   {
+     // parse mAnnotation (if any) and set mHistory
+@@ -1457,7 +1457,7 @@ SBase::setAnnotation (const std::string& annotation)
+   XMLNode* annt_xmln;
+   
+   // you might not have a document !!
+-  if (getSBMLDocument() != NULL)
++  if (getSBMLDocument() != 0)
+   {
+     const XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation,xmlns);
+@@ -1467,7 +1467,7 @@ SBase::setAnnotation (const std::string& annotation)
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation);
+   }
+   
+-  if(annt_xmln != NULL)
++  if(annt_xmln != 0)
+   {
+     success = setAnnotation(annt_xmln);
+     delete annt_xmln;
+@@ -1498,13 +1498,13 @@ SBase::appendAnnotation (const XMLNode* annotation)
+   // see bug reported via libsbml-team
+   // https://www.pivotaltracker.com/story/show/166576120
+ 
+-  if (getNumCVTerms() > 0 && mAnnotation == NULL)
++  if (getNumCVTerms() > 0 && mAnnotation == 0)
+   {
+     syncAnnotation();
+   }
+ 
+ 
+-  if(annotation == NULL)
++  if(annotation == 0)
+     return LIBSBML_OPERATION_SUCCESS;
+ 
+   // the annotation is an rdf annotation but the object has no metaid
+@@ -1516,7 +1516,7 @@ SBase::appendAnnotation (const XMLNode* annotation)
+     return LIBSBML_MISSING_METAID;
+   }
+ 
+-  XMLNode* new_annotation = NULL;
++  XMLNode* new_annotation = 0;
+   const string&  name = annotation->getName();
+ 
+   // check for annotation tags and add if necessary
+@@ -1532,7 +1532,7 @@ SBase::appendAnnotation (const XMLNode* annotation)
+   }
+ 
+ 
+-  if (mAnnotation != NULL)
++  if (mAnnotation != 0)
+   {
+     // if mAnnotation is just <annotation/> need to tell
+     // it to no longer be an end
+@@ -1607,14 +1607,14 @@ SBase::appendAnnotation (const std::string& annotation
+   // see bug reported via libsbml-team
+   // https://www.pivotaltracker.com/story/show/166576120
+ 
+-  if (getNumCVTerms() > 0 && mAnnotation == NULL)
++  if (getNumCVTerms() > 0 && mAnnotation == 0)
+   {
+     syncAnnotation();
+   }
+ 
+   int success = LIBSBML_OPERATION_FAILED;
+   XMLNode* annt_xmln;
+-  if (getSBMLDocument() != NULL)
++  if (getSBMLDocument() != 0)
+   {
+     const XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation,xmlns);
+@@ -1624,7 +1624,7 @@ SBase::appendAnnotation (const std::string& annotation
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation);
+   }
+ 
+-  if(annt_xmln != NULL)
++  if(annt_xmln != 0)
+   {
+     success = appendAnnotation(annt_xmln);
+     delete annt_xmln;
+@@ -1640,7 +1640,7 @@ SBase::removeTopLevelAnnotationElement(const std::stri
+ {
+ 
+   int success = LIBSBML_OPERATION_FAILED;
+-  if (mAnnotation == NULL)
++  if (mAnnotation == 0)
+   {
+     success = LIBSBML_OPERATION_SUCCESS;
+     return success;
+@@ -1694,11 +1694,11 @@ SBase::removeTopLevelAnnotationElement(const std::stri
+     if (removeEmpty && mAnnotation->getNumChildren() == 0)
+     {
+       delete mAnnotation;
+-      mAnnotation = NULL;
++      mAnnotation = 0;
+     }
+ 
+     // check success
+-    if (mAnnotation == NULL || mAnnotation->getIndex(elementName) < 0)
++    if (mAnnotation == 0 || mAnnotation->getIndex(elementName) < 0)
+     {
+       success = LIBSBML_OPERATION_SUCCESS;
+     }
+@@ -1712,7 +1712,7 @@ int
+ SBase::replaceTopLevelAnnotationElement(const XMLNode* annotation)
+ {
+   int success = LIBSBML_OPERATION_FAILED;
+-  XMLNode * replacement = NULL;
++  XMLNode * replacement = 0;
+   if (annotation->getName() == "annotation")
+   {
+     if (annotation->getNumChildren() != 1)
+@@ -1747,7 +1747,7 @@ SBase::replaceTopLevelAnnotationElement(const std::str
+ {
+   int success = LIBSBML_OPERATION_FAILED;
+   XMLNode* annt_xmln;
+-  if (getSBMLDocument() != NULL)
++  if (getSBMLDocument() != 0)
+   {
+     const XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation,xmlns);
+@@ -1757,7 +1757,7 @@ SBase::replaceTopLevelAnnotationElement(const std::str
+     annt_xmln = XMLNode::convertStringToXMLNode(annotation);
+   }
+ 
+-  if(annt_xmln != NULL)
++  if(annt_xmln != 0)
+   {
+     success = replaceTopLevelAnnotationElement(annt_xmln);
+   }
+@@ -1778,10 +1778,10 @@ SBase::setNotes(const XMLNode* notes)
+   {
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+-  else if (notes == NULL)
++  else if (notes == 0)
+   {
+     delete mNotes;
+-    mNotes = NULL;
++    mNotes = 0;
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+ 
+@@ -1831,7 +1831,7 @@ SBase::setNotes(const XMLNode* notes)
+       && !SyntaxChecker::hasExpectedXHTMLSyntax(mNotes, getSBMLNamespaces()))
+   {
+     delete mNotes;
+-    mNotes = NULL;
++    mNotes = 0;
+     return LIBSBML_INVALID_OBJECT;
+   }
+ 
+@@ -1855,7 +1855,7 @@ SBase::setNotes(const std::string& notes, bool addXHTM
+     XMLNode* notes_xmln;
+ 
+     // you might not have a document !!
+-    if (getSBMLDocument() != NULL)
++    if (getSBMLDocument() != 0)
+     {
+       const XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+       notes_xmln = XMLNode::convertStringToXMLNode(notes,xmlns);
+@@ -1865,7 +1865,7 @@ SBase::setNotes(const std::string& notes, bool addXHTM
+       notes_xmln = XMLNode::convertStringToXMLNode(notes);
+     }
+ 
+-    if(notes_xmln != NULL)
++    if(notes_xmln != 0)
+     {
+       if (addXHTMLMarkup == true)
+       {
+@@ -1923,7 +1923,7 @@ int
+ SBase::appendNotes(const XMLNode* notes)
+ {
+   int success = LIBSBML_OPERATION_FAILED;
+-  if(notes == NULL)
++  if(notes == 0)
+   {
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+@@ -2079,7 +2079,7 @@ SBase::appendNotes(const XMLNode* notes)
+   }
+ 
+ 
+-  if ( mNotes != NULL )
++  if ( mNotes != 0 )
+   {
+     //------------------------------------------------------------
+     //
+@@ -2272,7 +2272,7 @@ SBase::appendNotes(const std::string& notes)
+ 
+   XMLNode* notes_xmln;
+   // you might not have a document !!
+-  if (getSBMLDocument() != NULL)
++  if (getSBMLDocument() != 0)
+   {
+       const XMLNamespaces* xmlns = getSBMLDocument()->getNamespaces();
+       notes_xmln = XMLNode::convertStringToXMLNode(notes,xmlns);
+@@ -2282,7 +2282,7 @@ SBase::appendNotes(const std::string& notes)
+       notes_xmln = XMLNode::convertStringToXMLNode(notes);
+   }
+ 
+-  if(notes_xmln != NULL)
++  if(notes_xmln != 0)
+   {
+     success = appendNotes(notes_xmln);
+     delete notes_xmln;
+@@ -2297,7 +2297,7 @@ SBase::setModelHistory(ModelHistory * history)
+   // if there is no parent then the required attributes are not
+   // correctly identified
+   bool dummyParent = false;
+-  if (history != NULL && history->getParentSBMLObject() == NULL)
++  if (history != 0 && history->getParentSBMLObject() == 0)
+   {
+     history->setParentSBMLObject(this);
+     dummyParent = true;
+@@ -2324,17 +2324,17 @@ SBase::setModelHistory(ModelHistory * history)
+     {
+       status = LIBSBML_OPERATION_SUCCESS;
+     }
+-    else if (history == NULL)
++    else if (history == 0)
+     {
+       delete mHistory;
+-      mHistory = NULL;
++      mHistory = 0;
+       mHistoryChanged = true;
+       status = LIBSBML_OPERATION_SUCCESS;
+     }
+     else if (!(history->hasRequiredAttributes()))
+     {
+       delete mHistory;
+-      mHistory = NULL;
++      mHistory = 0;
+       status = LIBSBML_INVALID_OBJECT;
+     }
+     else
+@@ -2355,7 +2355,7 @@ SBase::setModelHistory(ModelHistory * history)
+ int 
+ SBase::setCreatedDate(Date* date)
+ {
+-  if (mHistory != NULL)
++  if (mHistory != 0)
+   {
+     return mHistory->setCreatedDate(date);
+   }
+@@ -2372,7 +2372,7 @@ SBase::setCreatedDate(Date* date)
+ int
+ SBase::addModifiedDate(Date* date)
+ {
+-  if (mHistory != NULL)
++  if (mHistory != 0)
+   {
+     return mHistory->addModifiedDate(date);
+   }
+@@ -2459,7 +2459,7 @@ SBase::getAncestorOfType(int type, const std::string& 
+   SBase *child;
+   SBase *parent = getParentSBMLObject();
+ 
+-  while ( parent != NULL &&
++  while ( parent != 0 &&
+           !( parent->getPackageName() == "core" &&
+              parent->getTypeCode() == SBML_DOCUMENT )
+         )
+@@ -2474,7 +2474,7 @@ SBase::getAncestorOfType(int type, const std::string& 
+   }
+ 
+   // if we get here we havent found an ancestor of this type
+-  return NULL;
++  return 0;
+ 
+ }
+ 
+@@ -2488,7 +2488,7 @@ SBase::getAncestorOfType(int type, const std::string p
+   const SBase *child;
+   const SBase *parent = getParentSBMLObject();
+ 
+-  while ( parent != NULL &&
++  while ( parent != 0 &&
+           !( parent->getPackageName() == "core" &&
+              parent->getTypeCode() == SBML_DOCUMENT )
+         )
+@@ -2503,7 +2503,7 @@ SBase::getAncestorOfType(int type, const std::string p
+   }
+ 
+   // if we get here we havent found an ancestor of this type
+-  return NULL;
++  return 0;
+ 
+ }
+ 
+@@ -2549,9 +2549,9 @@ SBase::setSBOTerm (const std::string &sboid)
+ int
+ SBase::setNamespaces(XMLNamespaces* xmlns)
+ {
+-  if (xmlns == NULL)
++  if (xmlns == 0)
+   {
+-    mSBMLNamespaces->setNamespaces(NULL);
++    mSBMLNamespaces->setNamespaces(0);
+     return LIBSBML_OPERATION_SUCCESS;
+   }
+   else
+@@ -2672,7 +2672,7 @@ int
+ SBase::unsetNotes ()
+ {
+   delete mNotes;
+-  mNotes = NULL;
++  mNotes = 0;
+   return LIBSBML_OPERATION_SUCCESS;
+ }
+ 
+@@ -2683,7 +2683,7 @@ SBase::unsetNotes ()
+ int
+ SBase::unsetAnnotation ()
+ {
+-  const XMLNode* empty = NULL;
++  const XMLNode* empty = 0;
+   return setAnnotation(empty);
+ }
+ 
+@@ -2752,7 +2752,7 @@ int SBase::addTermToExistingBag(CVTerm *term, Qualifie
+   unsigned int added = 0;
+   unsigned int length = mCVTerms->getSize();
+ 
+-  CVTerm* nthTerm = NULL;
++  CVTerm* nthTerm = 0;
+ 
+   if (length == 0) return (int)added;
+ 
+@@ -2764,7 +2764,7 @@ int SBase::addTermToExistingBag(CVTerm *term, Qualifie
+     {
+       nthTerm = static_cast <CVTerm *>(mCVTerms->get((unsigned int)n));
+ 
+-      if (nthTerm != NULL && biol == nthTerm->getBiologicalQualifierType())
++      if (nthTerm != 0 && biol == nthTerm->getBiologicalQualifierType())
+       {
+         for (int r = 0; r < term->getResources()->getLength(); r++)
+         {
+@@ -2783,7 +2783,7 @@ int SBase::addTermToExistingBag(CVTerm *term, Qualifie
+     {
+       nthTerm = static_cast <CVTerm *>(mCVTerms->get(n));
+ 
+-      if (nthTerm != NULL && model == nthTerm->getModelQualifierType())
++      if (nthTerm != 0 && model == nthTerm->getModelQualifierType())
+       {
+         for (int r = 0; r < term->getResources()->getLength(); r++)
+         {
+@@ -2811,7 +2811,7 @@ SBase::addCVTerm(CVTerm * term, bool newBag)
+     return LIBSBML_MISSING_METAID;
+   }
+ 
+-  if (term == NULL)
++  if (term == 0)
+   {
+     return LIBSBML_OPERATION_FAILED;
+   }
+@@ -2825,7 +2825,7 @@ SBase::addCVTerm(CVTerm * term, bool newBag)
+    */
+   CVTerm * copyTerm = term->clone();
+ 
+-  if (mCVTerms == NULL)
++  if (mCVTerms == 0)
+   {
+     mCVTerms = new List();
+     mCVTerms->add((void *) term->clone());
+@@ -2890,7 +2890,7 @@ SBase::getCVTerms() const
+ unsigned int
+ SBase::getNumCVTerms() const
+ {
+-  if (mCVTerms != NULL)
++  if (mCVTerms != 0)
+   {
+     return mCVTerms->getSize();
+   }
+@@ -2912,7 +2912,7 @@ SBase::getNumCVTerms() const
+ CVTerm*
+ SBase::getCVTerm(unsigned int n)
+ {
+-  return (mCVTerms) ? static_cast <CVTerm*> (mCVTerms->get(n)) : NULL;
++  return (mCVTerms) ? static_cast <CVTerm*> (mCVTerms->get(n)) : 0;
+ }
+ 
+ 
+@@ -2923,16 +2923,16 @@ SBase::getCVTerm(unsigned int n)
+ int
+ SBase::unsetCVTerms()
+ {
+-  if (mCVTerms != NULL)
++  if (mCVTerms != 0)
+   {
+     unsigned int size = mCVTerms->getSize();
+     while (size--) delete static_cast<CVTerm*>( mCVTerms->remove(0) );
+     delete mCVTerms;
+     mCVTermsChanged = true;
+   }
+-  mCVTerms = NULL;
++  mCVTerms = 0;
+ 
+-  if (mCVTerms != NULL)
++  if (mCVTerms != 0)
*** 1656 LINES SKIPPED ***



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202306261553.35QFr9af063114>