Update headers, fix style for some py files
[alexxy/gromacs.git] / src / python / sip / topology / topology.sip
index 07d9640b401265c2f62569a4eac80c0a0b7daecc..34c38b0bd93307fc059fc0711c77c10a5b28215f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -42,7 +42,8 @@ struct t_topology
 
     SIP_PYOBJECT      name /NoSetter/ {       // Name of the topology
     %GetCode
-        sipPy = sipBuildResult(NULL, "A", *(sipCpp->name));
+        // name is stored as char**, when the outer pointer is null, let sip wrap it as None
+        sipPy = sipBuildResult(NULL, "A", (sipCpp->name) ? *(sipCpp->name) : NULL);
     %End
     };
     //t_idef          idef;       [> The interaction function definition  <]