Skip to content

Commit

Permalink
Update some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
simleb committed Oct 1, 2014
1 parent c66d839 commit 1e7b89e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions h5g.go
Expand Up @@ -48,12 +48,12 @@ func (g *CommonFG) CreateDatasetWith(name string, dtype *Datatype, dspace *Datas
return createDataset(g.id, name, dtype, dspace, dcpl)
}

// Creates a new attribute at this location.
// CreateAttribute creates a new attribute at this location.
func (g *Group) CreateAttribute(name string, dtype *Datatype, dspace *Dataspace) (*Attribute, error) {
return createAttribute(g.id, name, dtype, dspace, P_DEFAULT)
}

// Creates a new attribute at this location.
// CreateAttributeWith creates a new attribute at this location with a user-defined PropList.
func (g *Group) CreateAttributeWith(name string, dtype *Datatype, dspace *Dataspace, acpl *PropList) (*Attribute, error) {
return createAttribute(g.id, name, dtype, dspace, acpl)
}
Expand Down
2 changes: 2 additions & 0 deletions h5i.go
Expand Up @@ -33,6 +33,7 @@ type Location struct {
Identifier
}

// Id returns the int value of an identifier.
func (i Identifier) Id() int {
return int(i.id)
}
Expand Down Expand Up @@ -62,6 +63,7 @@ func (i Identifier) File() *File {
return &File{CommonFG{Location{Identifier{fid}}}}
}

// Type returns the type of the identifier.
func (i Identifier) Type() IType {
return IType(C.H5Iget_type(i.id))
}
7 changes: 4 additions & 3 deletions h5t.go
Expand Up @@ -87,6 +87,7 @@ var (
}
)

// OpenDatatype opens a named datatype.
func OpenDatatype(c CommonFG, name string, tapl_id int) (*Datatype, error) {
c_name := C.CString(name)
defer C.free(unsafe.Pointer(c_name))
Expand Down Expand Up @@ -167,7 +168,7 @@ func copyDatatype(id C.hid_t) (*Datatype, error) {
return NewDatatype(hid), nil
}

// Determines whether two datatype identifiers refer to the same datatype.
// Equal determines whether two datatype identifiers refer to the same datatype.
func (t *Datatype) Equal(o *Datatype) bool {
return C.H5Tequal(t.id, o.id) > 0
}
Expand Down Expand Up @@ -317,14 +318,14 @@ type OpaqueDatatype struct {
Datatype
}

// Tags an opaque datatype.
// SetTag tags an opaque datatype.
func (t *OpaqueDatatype) SetTag(tag string) error {
ctag := C.CString(tag)
defer C.free(unsafe.Pointer(ctag))
return h5err(C.H5Tset_tag(t.id, ctag))
}

// Gets the tag associated with an opaque datatype.
// Tag returns the tag associated with an opaque datatype.
func (t *OpaqueDatatype) Tag() string {
cname := C.H5Tget_tag(t.id)
if cname != nil {
Expand Down

0 comments on commit 1e7b89e

Please sign in to comment.