Update headers, fix style for some py files
[alexxy/gromacs.git] / src / python / sip / topology / topology.sip
index b6e45898c38f2ae4a0ece01ad0dd1b254d143b70..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.
@@ -40,12 +40,10 @@ struct t_topology
 #include <gromacs/topology/topology.h>
 %End
 
-    char          **name {       // Name of the topology
+    SIP_PYOBJECT      name /NoSetter/ {       // Name of the topology
     %GetCode
-        sipPy = sipBuildResult(NULL, "s", *(sipCpp->name));
-    %End
-    %SetCode
-
+        // 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  <]